April 26, 2023 [Issue 23862] New: with statement should accept an expression with enum type | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=23862 Issue ID: 23862 Summary: with statement should accept an expression with enum type Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P1 Component: dmd Assignee: nobody@puremagic.com Reporter: bugzilla@digitalmars.com enum E { A, B } void test(E e) { with (e) switch (e) { case A: case B: default: break; } } fails with: Error: `with` expressions must be aggregate types or pointers to them, not `E` This should work. -- |
Copyright © 1999-2021 by the D Language Foundation