mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-05-29 20:36:01 +03:00
fix enum with one member and custom tag type
This commit is contained in:
@@ -11938,7 +11938,6 @@ static IrInstruction *ir_analyze_enum_to_int(IrAnalyze *ira, IrInstruction *sour
|
||||
if (enum_type->data.enumeration.layout == ContainerLayoutAuto &&
|
||||
enum_type->data.enumeration.src_field_count == 1)
|
||||
{
|
||||
assert(tag_type == ira->codegen->builtin_types.entry_num_lit_int);
|
||||
IrInstruction *result = ir_const(ira, source_instr, tag_type);
|
||||
init_const_bigint(&result->value, tag_type,
|
||||
&enum_type->data.enumeration.fields[0].value);
|
||||
|
||||
Reference in New Issue
Block a user