January 13, 2021 [Issue 21544] New: -checkaction=context formats enum members as their base type | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=21544 Issue ID: 21544 Summary: -checkaction=context formats enum members as their base type Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: minor Priority: P1 Component: druntime Assignee: nobody@puremagic.com Reporter: moonlightsentinel@disroot.org -checkaction=context doesn't recognize enums, e.g.: enum E { A, BCDE } void main() { E a = E.A; E b = E.BCDE; assert(a == b); } core.exception.AssertError@onlineapp.d(7): 0 != 1 The error message should probably print the exact member or at least include `cast(E)` as done e.g. for static assert. -- |
Copyright © 1999-2021 by the D Language Foundation