[Issue 3205] New: CTFE: $ cannot be used in lvalues

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jul 23 23:55:20 PDT 2009


http://d.puremagic.com/issues/show_bug.cgi?id=3205

           Summary: CTFE: $ cannot be used in lvalues
           Product: D
           Version: 1.046
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: clugdbug at yahoo.com.au


int bar()
{
   int [] x = [0, 1, 2];
   x[x.length-1] = 5; // works
   x[$-1] = 5; // fails
   return 0;
}

int z = bar();
---
ctfe.d(6): Error: variable __dollar is used before initialization
ctfe.d(10): Error: cannot evaluate bar() at compile time


I have a patch for this, together with 2569 and 1948.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list