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/structs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/compile/structs.c') diff --git a/src/compile/structs.c b/src/compile/structs.c index 8560a790..aaebef22 100644 --- a/src/compile/structs.c +++ b/src/compile/structs.c @@ -111,7 +111,7 @@ Text_t compile_struct_field_access(env_t *env, ast_t *ast) { } } } - code_err(ast, "The field '", f->field, "' is not a valid field name of ", type_to_str(value_t)); + code_err(ast, "The field '", f->field, "' is not a valid field name of ", type_to_text(value_t)); } public @@ -129,5 +129,5 @@ Text_t compile_struct_literal(env_t *env, ast_t *ast, type_t *t, arg_ast_t *args && is_valid_call(env, struct_->fields, args, (call_opts_t){.promotion = true, .underscores = true})) { code_err(ast, "This constructor uses private fields that are not exposed."); } - code_err(ast, "I could not find a constructor matching these arguments for the struct ", type_to_str(t)); + code_err(ast, "I could not find a constructor matching these arguments for the struct ", type_to_text(t)); } -- cgit v1.2.3