diff options
author | Bad Diode <bd@badd10de.dev> | 2024-06-26 11:48:02 +0200 |
---|---|---|
committer | Bad Diode <bd@badd10de.dev> | 2024-06-26 11:48:02 +0200 |
commit | 3dd1208c63b69b099b718be77457852c40692ed3 (patch) | |
tree | 29e97cb974479b06db93925120619a2b6ae79de9 /src | |
parent | 0b07018bff583040b2b299b46139a6210c76fde8 (diff) | |
download | bdl-3dd1208c63b69b099b718be77457852c40692ed3.tar.gz bdl-3dd1208c63b69b099b718be77457852c40692ed3.zip |
Fix a bug with type resolution for inner structs
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 | } |