www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 13001] New: Support VRE for ternary operator (CondExp)


          Issue ID: 13001
           Summary: Support VRE for ternary operator (CondExp)
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: lio+bugzilla lunesu.com

void main(string[] args)
  byte b;
  foreach (const i; 0..args.length?2:3)
    b = i;

test/runnable/testcondrange.d(5): Error: cannot implicitly convert expression
(i) of type const(int) to byte

Expected: no error

Jun 27 2014