www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 21544] New: -checkaction=context formats enum members as


          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.

Jan 12 2021