mirror of
https://github.com/ziglang/zig.git
synced 2026-02-13 21:08:36 +00:00
ir: fix handling of OnePossibleValueInvalid
this is the poison value which means a compile error has already been reported
This commit is contained in:
parent
bcbb2650c5
commit
1d5e349a52
@ -10562,8 +10562,9 @@ static IrInstruction *ir_analyze_enum_to_union(IrAnalyze *ira, IrInstruction *so
|
||||
return ira->codegen->invalid_instruction;
|
||||
|
||||
switch (type_has_one_possible_value(ira->codegen, union_field->type_entry)) {
|
||||
case OnePossibleValueNo:
|
||||
case OnePossibleValueInvalid: {
|
||||
case OnePossibleValueInvalid:
|
||||
return ira->codegen->invalid_instruction;
|
||||
case OnePossibleValueNo: {
|
||||
AstNode *field_node = wanted_type->data.unionation.decl_node->data.container_decl.fields.at(
|
||||
union_field->enum_field->decl_index);
|
||||
ErrorMsg *msg = ir_add_error(ira, source_instr,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user