| ... | @@ -6122,6 +6122,11 @@ ZigValue *get_the_one_possible_value(CodeGen *g, ZigType *type_entry) { | ... | @@ -6122,6 +6122,11 @@ ZigValue *get_the_one_possible_value(CodeGen *g, ZigType *type_entry) { |
| 6122 | result->data.x_ptr.mut = ConstPtrMutComptimeConst; | 6122 | result->data.x_ptr.mut = ConstPtrMutComptimeConst; |
| 6123 | result->data.x_ptr.special = ConstPtrSpecialRef; | 6123 | result->data.x_ptr.special = ConstPtrSpecialRef; |
| 6124 | result->data.x_ptr.data.ref.pointee = get_the_one_possible_value(g, result->type->data.pointer.child_type); | 6124 | result->data.x_ptr.data.ref.pointee = get_the_one_possible_value(g, result->type->data.pointer.child_type); |
| | 6125 | } else if (result->type->id == ZigTypeIdEnum) { |
| | 6126 | ZigType *enum_type = result->type; |
| | 6127 | assert(enum_type->data.enumeration.src_field_count == 1); |
| | 6128 | TypeEnumField *only_field = &result->type->data.enumeration.fields[0]; |
| | 6129 | bigint_init_bigint(&result->data.x_enum_tag, &only_field->value); |
| 6125 | } | 6130 | } |
| 6126 | g->one_possible_values.put(type_entry, result); | 6131 | g->one_possible_values.put(type_entry, result); |
| 6127 | return result; | 6132 | return result; |