diff --git a/releasenotes.md b/releasenotes.md index c9df689a4..4d3af0a18 100644 --- a/releasenotes.md +++ b/releasenotes.md @@ -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`. diff --git a/src/compiler/headers.c b/src/compiler/headers.c index 0ea399c8f..bd63e15d8 100644 --- a/src/compiler/headers.c +++ b/src/compiler/headers.c @@ -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: