D issues are now
tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Summary: |
[CTFE] Non-constant case expressions can't be interpreted |
Product: |
D
|
Reporter: |
Don <clugdbug> |
Component: |
dmd | Assignee: |
No Owner <nobody> |
Status: |
RESOLVED
FIXED
|
Severity: |
normal
|
CC: |
bugzilla
|
Priority: |
P2
|
Version: |
D2 |
Hardware: |
Other |
OS: |
Windows |
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