[Issue 6985] New: [CTFE] Non-constant case expressions can't be interpreted

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Nov 21 14:43:53 PST 2011


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: nobody at puremagic.com
        ReportedBy: clugdbug at yahoo.com.au


--- Comment #0 from Don <clugdbug at 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: -------


More information about the Digitalmars-d-bugs mailing list