aboutsummaryrefslogtreecommitdiff
path: root/src/compile/lists.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-10-12 13:29:55 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-10-12 13:29:55 -0400
commitbd190ac0a84eefa3174c04ce1fe2059aed6f2d1b (patch)
tree09a21a50b60270ce26b2e78d51be20e2696280a4 /src/compile/lists.c
parent24c6324898dd08007e3aa96abda3adf2941c90eb (diff)
Better error checking and reporting
Diffstat (limited to 'src/compile/lists.c')
-rw-r--r--src/compile/lists.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/compile/lists.c b/src/compile/lists.c
index bb94eb1d..54ad6e7f 100644
--- a/src/compile/lists.c
+++ b/src/compile/lists.c
@@ -23,6 +23,7 @@ Text_t compile_typed_list(env_t *env, ast_t *ast, type_t *list_type) {
if (!list->items) return Text("EMPTY_LIST");
type_t *item_type = Match(list_type, ListType)->item_type;
+ if (item_type == NULL) code_err(ast, "I couldn't figure out what item type goes into this list");
int64_t n = 0;
for (ast_list_t *item = list->items; item; item = item->next) {