[Issue 20520] Runtime segfault when taking typeid of a class instanciated within an enum
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Jan 3 08:38:21 UTC 2023
https://issues.dlang.org/show_bug.cgi?id=20520
Walter Bright <bugzilla at digitalmars.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bugzilla at digitalmars.com
--- Comment #5 from Walter Bright <bugzilla at digitalmars.com> ---
Razvan is right. This should not compile. An enum's value should evaluate to a
constant, not a pointer to the heap.
Just like this does not compile:
class C { }
C x = new C();
--
More information about the Digitalmars-d-bugs
mailing list