aboutsummaryrefslogtreecommitdiff
path: root/src/compile/indexing.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-09-21 15:14:37 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-09-21 15:14:37 -0400
commitf5612e38183dc20d18f207f8ab055574a4d93ad0 (patch)
treec2caf5a0311b6d9fd0fbd4c08493dac5981088be /src/compile/indexing.c
parent7f6683269ce689a83b9c6e1fae15e0cc60351095 (diff)
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`
Diffstat (limited to 'src/compile/indexing.c')
-rw-r--r--src/compile/indexing.c4
1 files changed, 2 insertions, 2 deletions
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));
}
}