On Apr 30, 11 01:54, Steven Schveighoffer wrote:
On Fri, 29 Apr 2011 13:49:19 -0400, KennyTM~ <[email protected]> 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 K K k; k = 8; // OK. } ------------------------Interesting! So this is definitely an inconsistency that indicates the class version is a bug. -Steve
Turns out it is an old bug. http://d.puremagic.com/issues/show_bug.cgi?id=671
