Summary: Ternary operator doesn't yield an lvalue
           Product: D
           Version: unspecified
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from Andrei Alexandrescu <> 2009-10-08 
11:20:15 PDT ---

    int x, y;
    (true ? x : y) += 5;

This code fails with:

Error: conditional expression true ? x : y is not a modifiable lvalue

When both branches in a ternary expression are lvalues of the same type, the
result must be an lvalue.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to