On Fri, 29 Apr 2011 13:49:19 -0400, KennyTM~ <kenn...@gmail.com> wrote:
Though this isn't valid with a 'struct'. ------------------------ import std.stdio; struct K { K opAssign(int x) { writeln(x); return this; } } void main() {// K k = 8; // Error: cannot implicitly convert expression (8) of type int to KK k; k = 8; // OK. } ------------------------
Interesting! So this is definitely an inconsistency that indicates the class version is a bug.
-Steve