[Issue 22012] enum: dotExp lookups allow recursive dereference

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jun 10 18:08:12 UTC 2021


https://issues.dlang.org/show_bug.cgi?id=22012

--- Comment #1 from anonymous4 <dfj1esp02 at sneakemail.com> ---
Reproduction with classes:
---
class A
{
    int a;
}
class B:A
{
    enum a=1;
}
int f()
{
    B b=new B();
    return b.a;
}
static assert(f==1);
---

--


More information about the Digitalmars-d-bugs mailing list