diff --git a/src/hir_lower.bux b/src/hir_lower.bux index 7cc205b..231d2ab 100644 --- a/src/hir_lower.bux +++ b/src/hir_lower.bux @@ -682,6 +682,9 @@ module HirLower { } func Lcx_SubstEnumName(ctx: *LowerCtx, name: String) -> String { + // HIR nodes may carry null names (e.g. hStore without typeName); + // Nim tolerated nil strings, bux_strlen(NULL) segfaults. + if name == null as String { return name; } // If name is a bare generic enum name, mangle to concrete name var ge: *Decl = Lcx_FindGenericEnum(ctx, name); if ge != null as *Decl {