is this right??

BCS none at anon.com
Tue Jun 16 21:00:42 PDT 2009


Hello Ary,

> BCS escribió:
> 
>> Hello BCS,
>> 
>>> void main()
>>> {
>>> int s;
>>> mixin("s") = 5;
>>> }
>>> -----
>>> Line 4: found '=' when expecting ';'
>>> http://www.digitalmars.com/d/1.0/expression.html#MixinExpression
>> (mixin("s")) = 5;
>> 
>> Given that the above works, it looks like the parser prematurely
>> commits to a mixin declaration when it finds "mixin (" at function
>> scope.
>> 
>> Unless someone spots a flaw in this, I'll post a bug.
>> 
> Yes, at that point the parser is parsing statements, so if it finds a
> "mixin(...)" it turns it into a statement.
> 

http://d.puremagic.com/issues/show_bug.cgi?id=3073

Hope you don't mind me quoting you.




More information about the Digitalmars-d-learn mailing list