| author | |
| committer | |
| log | b52948444f16c082f0e29bb75b246370c4b11326 |
| tree | a11b00ef2970fc7d29ff684b004aabf9f74ceb7d |
| parent | 4d658f83ed3893cf950615e9f58c2b533525b71d |
This bug only causes a failure on my machine when running
test/behavior/eval.zig directly. If running the full behavior test
suite, std.builtin.TypeInfo will have already resolved its layout,
causing the test to pass.
I'd love to add a test that can reliably reproduce this problem,
but I'm afraid I'm not sure how to reliably create a union with
un-resolved layout.1 files changed, 1 insertions(+), 0 deletions(-)
src/Sema.zig+1| ... | ... | @@ -11837,6 +11837,7 @@ fn zirTagName(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Air |
| 11837 | 11837 | const operand = sema.resolveInst(inst_data.operand); |
| 11838 | 11838 | const operand_ty = sema.typeOf(operand); |
| 11839 | 11839 | |
| 11840 | try sema.resolveTypeLayout(block, operand_src, operand_ty); | |
| 11840 | 11841 | const enum_ty = switch (operand_ty.zigTypeTag()) { |
| 11841 | 11842 | .EnumLiteral => { |
| 11842 | 11843 | const val = try sema.resolveConstValue(block, operand_src, operand); |