-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.
@MoonlightSentinel created dlang/druntime pull request #3336 "Fix 21544 - -checkaction=context formats enum members as their base type" fixing this issue: - Fix 21544 - -checkaction=context formats enum members as their base type Generate code that detects the correct enum member (or defaults to the base type in case of an invalid enum value). https://github.com/dlang/druntime/pull/3336
dlang/druntime pull request #3336 "Fix 21544 - -checkaction=context formats enum members as their base type" was merged into master: - 02dd9d99f415ba1ba4fae6e2d590a967cd03c385 by MoonlightSentinel: Fix 21544 - -checkaction=context formats enum members as their base type Generate code that detects the correct enum member (or defaults to the base type in case of an invalid enum value). https://github.com/dlang/druntime/pull/3336