Bug 6985 – [CTFE] Non-constant case expressions can't be interpreted
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Windows
Creation time
2011-11-21T14:43:00Z
Last change time
2015-06-09T05:10:43Z
Assigned to
nobody
Creator
clugdbug
Comments
Comment #0 by clugdbug — 2011-11-21T14:43:01Z
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