Fix crash when exporting functions with const enums #2384 (#2414)

* headers: handle const enums in exported signatures as base type

* update releasenotes.md

---------

Co-authored-by: Christoffer Lerno <christoffer@aegik.com>
This commit is contained in:
Christian Brendlin
2025-08-18 22:49:42 +02:00
committed by GitHub
parent 43163fe2a0
commit 96127d4ff3
2 changed files with 4 additions and 1 deletions

View File

@@ -48,6 +48,7 @@
- Occasionally when using macro method extensions on built-in types, the liveness checker would try to process them. #2398
- Miscompilation of do-while when the while starts with a branch #2394.
- Compiler assert when calling unassigned CT functions #2418.
- Fixed crash in header generation when exporting functions with const enums (#2384).
### Stdlib changes
- Add `==` to `Pair`, `Triple` and TzDateTime. Add print to `Pair` and `Triple`.

View File

@@ -553,7 +553,9 @@ RETRY:
header_gen_enum(c, 0, type->decl);
return;
case TYPE_CONST_ENUM:
TODO;
// TODO;
type = type_flatten(type);
goto RETRY;
case TYPE_FUNC_RAW:
UNREACHABLE
case TYPE_STRUCT: