[Issue 21861] New: ctfe fails when a nested enum or function has a UDA
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Apr 25 13:49:27 UTC 2021
https://issues.dlang.org/show_bug.cgi?id=21861
Issue ID: 21861
Summary: ctfe fails when a nested enum or function has a UDA
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: eyal at weka.io
CTFE execution fails when nested enums or functions have a UDA on them:
int f() {
@("S")
struct S {}
@("U")
union U {}
@("C")
class C {}
// CTFE fails on this:
@("E")
enum E { X }
// CTFE fails on this:
@("f")
void f() {}
return 5;
}
static assert(f() == 5);
e.g the enum errors out with:
Error: declaration `@("E")enum E : int { ... }` is not yet implemented in
CTFE
--
More information about the Digitalmars-d-bugs
mailing list