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.
This commit is contained in:
Nick Treleaven 2023-07-13 11:31:51 +01:00 committed by GitHub
parent 2a1f972f9d
commit 90f5bd1635
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 36 additions and 6 deletions

View file

@ -2,7 +2,7 @@
* TEST_OUTPUT:
---
fail_compilation/biterrors3.d(103): Error: storage class not allowed for bit-field declaration
fail_compilation/biterrors3.d(106): Error: `d` is not a valid attribute for enum members
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
---