InternPool: add representation for value of empty enums and unions
This is a bit odd, because this value doesn't actually exist: see #15909. This gets all the empty enum/union behavior tests passing. Also adds an assertion to `Sema.analyzeBodyInner` which would have helped figure out the issue here much more quickly.
This commit is contained in:
@@ -242,6 +242,7 @@ pub fn generateSymbol(
|
||||
.extern_func,
|
||||
.func,
|
||||
.enum_literal,
|
||||
.empty_enum_value,
|
||||
=> unreachable, // non-runtime values
|
||||
.int => {
|
||||
const abi_size = math.cast(usize, typed_value.ty.abiSize(mod)) orelse return error.Overflow;
|
||||
|
||||
Reference in New Issue
Block a user