[Issue 18578] First enum value assigned 0 instead of EnumBaseType.init

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Aug 15 17:57:16 UTC 2020


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

Basile-z <b2.temp at gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |rejects-valid
             Status|RESOLVED                    |REOPENED
                 CC|                            |b2.temp at gmx.com
         Resolution|FIXED                       |---
           Severity|enhancement                 |normal

--- Comment #4 from Basile-z <b2.temp at gmx.com> ---
new TC:

---
enum E      { e1 = 1 }
enum F: E   { f1     }

static assert(F.init == 1);
---

> /tmp/temp_7F28124F66B0.d(4,1): Error: static assert:  `cast(F)cast(E)0 == 1` is false

--


More information about the Digitalmars-d-bugs mailing list