aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorBad Diode <bd@badd10de.dev>2024-06-26 11:48:02 +0200
committerBad Diode <bd@badd10de.dev>2024-06-26 11:48:02 +0200
commit3dd1208c63b69b099b718be77457852c40692ed3 (patch)
tree29e97cb974479b06db93925120619a2b6ae79de9 /src/main.c
parent0b07018bff583040b2b299b46139a6210c76fde8 (diff)
downloadbdl-3dd1208c63b69b099b718be77457852c40692ed3.tar.gz
bdl-3dd1208c63b69b099b718be77457852c40692ed3.zip
Fix a bug with type resolution for inner structs
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 3027a1b..f0c4469 100644
--- a/src/main.c
+++ b/src/main.c
@@ -407,7 +407,7 @@ typecheck_field(Analyzer *a, Node *node, TypeScope *scope, Str symbol) {
407 Str field_name = str_concat(symbol, cstr("."), a->storage); 407 Str field_name = str_concat(symbol, cstr("."), a->storage);
408 field_name = str_concat(field_name, node->value.str, a->storage); 408 field_name = str_concat(field_name, node->value.str, a->storage);
409 Str field_type = node->field_type->value.str; 409 Str field_type = node->field_type->value.str;
410 if (!typemap_lookup(&scope->types, field_type)) { 410 if (!find_type(scope, field_type)) {
411 eprintln("%s:%d:%d: error: unknown type '%s'", a->file_name, 411 eprintln("%s:%d:%d: error: unknown type '%s'", a->file_name,
412 node->field_type->line, node->field_type->col, field_type); 412 node->field_type->line, node->field_type->col, field_type);
413 } 413 }