Fix issue when parsing bitstructs, preventing them from implementing interfaces.

This commit is contained in:
Christoffer Lerno
2025-02-13 21:51:22 +01:00
parent e96dce92cd
commit 6ca77065d8
2 changed files with 3 additions and 0 deletions

View File

@@ -68,6 +68,7 @@
- Fix `poll` and `POLL_FOREVER`.
- Missing end padding when including a packed struct #1966.
- Issue when scalar expanding a boolean from a conditional to a bool vector #1954.
- Fix issue when parsing bitstructs, preventing them from implementing interfaces.
### Stdlib changes
- Added '%h' and '%H' for printing out binary data in hexadecimal using the formatter.

View File

@@ -1830,6 +1830,8 @@ static inline Decl *parse_bitstruct_declaration(ParseContext *c)
if (!consume_type_name(c, "bitstruct")) return poisoned_decl;
if (!parse_interface_impls(c, &decl->interfaces)) return poisoned_decl;
TRY_CONSUME_OR_RET(TOKEN_COLON, "':' followed by bitstruct type (e.g. 'int') was expected here.", poisoned_decl);
ASSIGN_TYPE_OR_RET(decl->strukt.container_type, parse_type(c), poisoned_decl);