From f5612e38183dc20d18f207f8ab055574a4d93ad0 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 21 Sep 2025 15:14:37 -0400 Subject: Bugfixes for anonymous enums, code cleanup to remove type_to_string(), and changed it so anonymous enums show up in doctests with their full type instead of `enum$20` --- src/compile/types.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/compile/types.c') diff --git a/src/compile/types.c b/src/compile/types.c index f6f276a5..6b6f48f8 100644 --- a/src/compile/types.c +++ b/src/compile/types.c @@ -79,7 +79,7 @@ Text_t compile_type(type_t *t) { DeclareMatch(s, nonnull, StructType); return namespace_name(s->env, s->env->namespace->parent, Texts("$Optional", s->name, "$$type")); } - default: compiler_err(NULL, NULL, NULL, "Optional types are not supported for: ", type_to_str(t)); + default: compiler_err(NULL, NULL, NULL, "Optional types are not supported for: ", type_to_text(t)); } } case TypeInfoType: return Text("TypeInfo_t"); @@ -147,7 +147,7 @@ Text_t compile_type_info(type_t *t) { case TypeInfoType: return Texts("Type$info(", quoted_text(type_to_text(Match(t, TypeInfoType)->type)), ")"); case MemoryType: return Text("&Memory$info"); case VoidType: return Text("&Void$info"); - default: compiler_err(NULL, 0, 0, "I couldn't convert to a type info: ", type_to_str(t)); + default: compiler_err(NULL, 0, 0, "I couldn't convert to a type info: ", type_to_text(t)); } return EMPTY_TEXT; } -- cgit v1.2.3