| ... | @@ -9396,10 +9396,12 @@ static TypeTableEntry *ir_analyze_instruction_field_ptr(IrAnalyze *ira, IrInstru | ... | @@ -9396,10 +9396,12 @@ static TypeTableEntry *ir_analyze_instruction_field_ptr(IrAnalyze *ira, IrInstru |
| 9396 | } | 9396 | } |
| 9397 | } | 9397 | } |
| 9398 | ScopeDecls *container_scope = get_container_scope(child_type); | 9398 | ScopeDecls *container_scope = get_container_scope(child_type); |
| 9399 | auto entry = container_scope->decl_table.maybe_get(field_name); | 9399 | if (container_scope != nullptr) { |
| 9400 | Tld *tld = entry ? entry->value : nullptr; | 9400 | auto entry = container_scope->decl_table.maybe_get(field_name); |
| 9401 | if (tld) { | 9401 | Tld *tld = entry ? entry->value : nullptr; |
| 9402 | return ir_analyze_decl_ref(ira, &field_ptr_instruction->base, tld); | 9402 | if (tld) { |
| | 9403 | return ir_analyze_decl_ref(ira, &field_ptr_instruction->base, tld); |
| | 9404 | } |
| 9403 | } | 9405 | } |
| 9404 | ir_add_error(ira, &field_ptr_instruction->base, | 9406 | ir_add_error(ira, &field_ptr_instruction->base, |
| 9405 | buf_sprintf("container '%s' has no member called '%s'", | 9407 | buf_sprintf("container '%s' has no member called '%s'", |