July 25 [Issue 24341] Switch over enum are poorly verified | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=24341 Bolpat <qs.il.paperinik@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |qs.il.paperinik@gmail.com --- Comment #1 from Bolpat <qs.il.paperinik@gmail.com> --- This is actually 2 issues: - If a `case` label is out of range for the `enum` type’s backing type, should that be illegal? (IMO, yes, except in templates.) - If a `case` label has a value that’s in range for the type’s backing type, but is different from all `enum` values, should that be an error? (IMO, hard no. Some `enum` types are bit-fields and it can make sense to test for certain combinations specifically.) -- |
Copyright © 1999-2021 by the D Language Foundation