Bug 21861 – ctfe fails when a nested enum or function has a UDA

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-04-25T13:49:27Z
Last change time
2021-04-27T10:42:06Z
Keywords
pull
Assigned to
No Owner
Creator
Eyal

Comments

Comment #0 by eyal — 2021-04-25T13:49:27Z
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
Comment #1 by dlang-bot — 2021-04-25T16:46:31Z
@BorisCarvajal created dlang/dmd pull request #12472 "Fix Issue 21861 - ctfe fails when a nested enum or function has a UDA" fixing this issue: - Fix Issue 21861 - ctfe fails when a nested enum or function has a UDA https://github.com/dlang/dmd/pull/12472
Comment #2 by dlang-bot — 2021-04-27T10:42:06Z
dlang/dmd pull request #12472 "Fix Issue 21861 - ctfe fails when a nested enum or function has a UDA" was merged into master: - 1d03b753733017828371b2527dc6cbea4be1304b by Boris Carvajal: Fix Issue 21861 - ctfe fails when a nested enum or function has a UDA https://github.com/dlang/dmd/pull/12472