diff options
| author | Vexu <git@vexu.eu> | 2020-12-20 23:28:13 +0200 |
|---|---|---|
| committer | Veikka Tuominen <git@vexu.eu> | 2020-12-21 12:40:51 +0200 |
| commit | 286077fec8f381c7b4d4d5bf351d963564a1dd69 (patch) | |
| tree | 09110b434343c02573e454bb7204bdfb7d858521 /src | |
| parent | 4918605176c2e48c178847ea281b790334207733 (diff) | |
| download | zig-286077fec8f381c7b4d4d5bf351d963564a1dd69.tar.gz zig-286077fec8f381c7b4d4d5bf351d963564a1dd69.zip | |
stage1: add missing error check on inferred struct field ptr
Diffstat (limited to 'src')
| -rw-r--r-- | src/stage1/ir.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/stage1/ir.cpp b/src/stage1/ir.cpp index 0e1c659642..9278ee7564 100644 --- a/src/stage1/ir.cpp +++ b/src/stage1/ir.cpp @@ -19980,6 +19980,9 @@ static IrInstGen *ir_resolve_result(IrAnalyze *ira, IrInst *suspend_source_instr result_loc = ir_analyze_struct_field_ptr(ira, suspend_source_instr, field, casted_ptr, isf->inferred_struct_type, true); + if (type_is_invalid(result_loc->value->type)) { + return result_loc; + } result_loc_pass1->resolved_loc = result_loc; } |
