[Issue 22028] importC: Parser accepts initializers for struct members
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Jun 16 08:22:24 UTC 2021
https://issues.dlang.org/show_bug.cgi?id=22028
--- Comment #1 from Iain Buclaw <ibuclaw at gdcproject.org> ---
Checking whether this affects bit-fields, the parser finds the syntax confusing
enough to emit an error (errors are emitted after WIP modifications to accept
bit-field syntax in cparseDeclaration)
---
struct S
{
int bf1 : 4 = 5; // Error: cannot modify constant `4`
int : 4 = 5; // Error: cannot modify constant `4`
int bf2 = 5 : 4; // Error: `=`, `;` or `,` expected (at position `:`)
int = 5 : 4; // Error: `=`, `;` or `,` expected (at position `=` ???)
};
--
More information about the Digitalmars-d-bugs
mailing list