On Thursday, 4 October 2012 at 23:16:53 UTC, Tommi wrote:

Didn't see that coming. But I think it might be a bug, because assignment expression has precedence over sequencing expression, that is, expressions separated by commas.

Although that's not an assignment expression, but a variable definition. I think the following should be a bug then (currently):

if (int val = 123, true)
{
    //...
}

Because the following is a bug:

int val = 123, true; // Error: no identifier for declarator int
                     // Error: semicolon expected, not 'true'

Reply via email to