dmd/compiler/test/fail_compilation/biterrors3.d
Nick Treleaven 90f5bd1635
Fix several errors parsing enum members (#15392)
* Fix unexpected token after identifier error for named enum

* Fix Issue 24041 - Anon enum member ignores repeated type or identifier

Also adds test for missing initializer when type is specified and tweaks
that error.
2023-07-13 12:31:51 +02:00

18 lines
489 B
D

/* REQUIRED_ARGS: -preview=bitfields
* TEST_OUTPUT:
---
fail_compilation/biterrors3.d(103): Error: storage class not allowed for bit-field declaration
fail_compilation/biterrors3.d(106): Error: expected `,` or `=` after identifier, not `:`
fail_compilation/biterrors3.d(106): Error: `:` is not a valid attribute for enum members
fail_compilation/biterrors3.d(106): Error: `3` is not a valid attribute for enum members
---
*/
#line 100
struct S
{
static int : 3;
}
enum E { d : 3 }