is this right??

BCS none at anon.com
Tue Jun 16 20:27:27 PDT 2009


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.




More information about the Digitalmars-d-learn mailing list