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

           Summary: [CTFE] Non-constant case expressions can't be
                    interpreted
           Product: D
           Version: D1 & D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: clugd...@yahoo.com.au


--- Comment #0 from Don <clugd...@yahoo.com.au> 2011-11-21 14:43:01 PST ---
int bug6985(int z)
{
    int q = z *2 - 6;
    switch(z)
    {
    case q:
        break;
    default:
    }
    return q;
}

static assert(bug6985(4));

test.d(13):        called from here: bug6985(4)
test.d(13): Error: static assert  (bug6985(4)) is not evaluatable at compile
time

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

Reply via email to