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/indexing.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/compile/indexing.c') diff --git a/src/compile/indexing.c b/src/compile/indexing.c index bb7bf6b9..771e9acd 100644 --- a/src/compile/indexing.c +++ b/src/compile/indexing.c @@ -33,7 +33,7 @@ Text_t compile_indexing(env_t *env, ast_t *ast, bool checked) { type_t *index_t = get_type(env, indexing->index); if (container_t->tag == ListType) { if (index_t->tag != IntType && index_t->tag != BigIntType && index_t->tag != ByteType) - code_err(indexing->index, "Lists can only be indexed by integers, not ", type_to_str(index_t)); + code_err(indexing->index, "Lists can only be indexed by integers, not ", type_to_text(index_t)); type_t *item_type = Match(container_t, ListType)->item_type; Text_t list = compile_to_pointer_depth(env, indexing->indexed, 0, false); Text_t index_code = @@ -82,6 +82,6 @@ Text_t compile_indexing(env_t *env, ast_t *ast, bool checked) { compile_to_type(env, indexing->index, Type(BigIntType)), ")"); } } else { - code_err(ast, "Indexing is not supported for type: ", type_to_str(container_t)); + code_err(ast, "Indexing is not supported for type: ", type_to_text(container_t)); } } -- cgit v1.2.3