On 16/05/2013 17:58, Ali Çehreli wrote:
On 05/16/2013 03:08 AM, Bruno Medeiros wrote:

 > On 14/05/2013 06:45, TommiT wrote:

 >> Notice that "alias this = id" is not supposed to be valid syntax.
 >
 > Huh, what's this about? DMD does not seem to recognize it, but it's
 > listed in the grammar. Is it an upcoming feature or is the grammar out
 > of date?

When the other use of alias has been changed from

   alias int NewName;  // weird syntax

to

   alias NewName = int;  // welcome syntax

'alias this' has also been inadvertently changed from

   alias memberFunc this;    // still valid syntax

to

   alias this = memberFunc;  // buggy syntax

It has been a recent bug which has quickly been reverted. Here is a past
discussion:

   http://forum.dlang.org/thread/aaflopktcjmljxdno...@forum.dlang.org

Ali


Ah I see. I was about to ask why was it put in the grammar documentation then, but it seems it is no longer there for the online version of the documentation:
http://dlang.org/declaration.html#AliasThisDeclaration

It is still present in the documentaton of the 2.062 DMD download though, hence my confusion. :S
(I was looking at the download doc)

--
Bruno Medeiros - Software Engineer

Reply via email to