[Issue 24703] New: Assigning from comma expression is allowed
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Wed Aug 14 20:40:24 UTC 2024
    
    
  
https://issues.dlang.org/show_bug.cgi?id=24703
          Issue ID: 24703
           Summary: Assigning from comma expression is allowed
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: minor
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: nick at geany.org
The last line below should error.
void main()
{
    int x = 1, y;
    //y = (x++,x++); // Error: using the result of a comma expression is not
allowed
    y = x++,x++; // no error
}
--
    
    
More information about the Digitalmars-d-bugs
mailing list