View mode: basic / threaded / horizontal-split · Log in · Help
October 08, 2009
[Issue 3375] New: Ternary operator doesn't yield an lvalue
http://d.puremagic.com/issues/show_bug.cgi?id=3375

          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
       AssignedTo: nobody@puremagic.com
       ReportedBy: andrei@metalanguage.com


--- Comment #0 from Andrei Alexandrescu <andrei@metalanguage.com> 2009-10-08 11:20:15 PDT ---
Consider:

   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: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
December 06, 2009
[Issue 3375] [tdpl] Ternary operator doesn't yield an lvalue
http://d.puremagic.com/issues/show_bug.cgi?id=3375


Walter Bright <bugzilla@digitalmars.com> changed:

          What    |Removed                     |Added
----------------------------------------------------------------------------
            Status|NEW                         |RESOLVED
                CC|                            |bugzilla@digitalmars.com
        Resolution|                            |FIXED


--- Comment #1 from Walter Bright <bugzilla@digitalmars.com> 2009-12-06 00:51:14 PST ---
Fixed dmd 2.037

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Top | Discussion index | About this forum | D home