2013/2/10 bearophile <[email protected]> > Now I have a good amount of code broken by: > > alias x = 5; >
This syntax never been valid in past, because alias declaration cannot make alias of an expression. > alias this = foo; > This syntax was introduced very recent, in 2.061. ====== >From 2.061, we have get new alias syntax by fixing issue 3011. http://d.puremagic.com/issues/show_bug.cgi?id=3011 Now we can write alias declaration as follows: alias Integer = int; alias IntArray = int[]; These syntax are continuously valid in 2.062. But, while a discussion for the compiler fix, a wrong syntax change, which has similar look but definitely different meaning, had been introduced. https://github.com/D-Programming-Language/dmd/pull/1187 struct S { int value; alias value this; // old syntax alias this = value; // new syntax, from 2.061 } I opened the pull request #1413 in the beta term for 2.061, but it had _accidentally_ released without deeply discussion. https://github.com/D-Programming-Language/dmd/pull/1413 I think and believe that we MUST reset things. Kenji Hara
