diff options
| author | Ian Johnson <ian@ianjohnson.dev> | 2023-07-09 21:30:56 -0400 |
|---|---|---|
| committer | Veikka Tuominen <git@vexu.eu> | 2023-07-10 19:17:50 +0300 |
| commit | 3a30f0fa505e25c98772f9faffe5490b92773708 (patch) | |
| tree | cf01d2399b43aa5f4b6970422dcbd0683f15367f /src | |
| parent | 82a9d5d78d891b093c1755ecd5452b65619fdccf (diff) | |
| download | zig-3a30f0fa505e25c98772f9faffe5490b92773708.tar.gz zig-3a30f0fa505e25c98772f9faffe5490b92773708.zip | |
Sema: resolve field type layout for anon struct type info
Closes #16148
Diffstat (limited to 'src')
| -rw-r--r-- | src/Sema.zig | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Sema.zig b/src/Sema.zig index bfefcef8e2..9f2c577a0b 100644 --- a/src/Sema.zig +++ b/src/Sema.zig @@ -17293,6 +17293,8 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai } }); }; + try sema.resolveTypeLayout(field_ty.toType()); + const is_comptime = field_val != .none; const opt_default_val = if (is_comptime) field_val.toValue() else null; const default_val_ptr = try sema.optRefValue(block, field_ty.toType(), opt_default_val); |
