authorgravatar for jhc@dismail.deJimmi Holst Christensen <jhc@dismail.de> 2019-03-08 12:52:21+01:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-03-11 10:55:10-04:00
log2d7f0ca387898fa6fb7da7946e4ecff45058b99c
tree32ef3a7eb2ae6c687e495d13b907ae7883c5ec82
parent5a52613caf940b264bc0ed011e503ceec769200a
signature Commit is signed but in an unrecognized format.

fixed enum to union code


1 files changed, 3 insertions(+), 0 deletions(-)

src/ir.cpp+3
...@@ -10576,6 +10576,9 @@ static IrInstruction *ir_analyze_enum_to_union(IrAnalyze *ira, IrInstruction *so...@@ -10576,6 +10576,9 @@ static IrInstruction *ir_analyze_enum_to_union(IrAnalyze *ira, IrInstruction *so
10576 result->value.special = ConstValSpecialStatic;10576 result->value.special = ConstValSpecialStatic;
10577 result->value.type = wanted_type;10577 result->value.type = wanted_type;
10578 bigint_init_bigint(&result->value.data.x_union.tag, &val->data.x_enum_tag);10578 bigint_init_bigint(&result->value.data.x_union.tag, &val->data.x_enum_tag);
10579 result->value.data.x_union.payload = create_const_vals(1);
10580 result->value.data.x_union.payload->special = ConstValSpecialStatic;
10581 result->value.data.x_union.payload->type = union_field->type_entry;
10579 return result;10582 return result;
10580 }10583 }
1058110584