mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 14:23:09 +00:00
codegen: empty tuple can be stored in a runtime var
This commit is contained in:
parent
fbdcb2289b
commit
e5d78f0b55
@ -225,13 +225,12 @@ pub fn generateSymbol(
|
||||
|
||||
.undef => unreachable, // handled above
|
||||
.simple_value => |simple_value| switch (simple_value) {
|
||||
.undefined,
|
||||
.void,
|
||||
.null,
|
||||
.empty_tuple,
|
||||
.@"unreachable",
|
||||
.generic_poison,
|
||||
=> unreachable, // non-runtime values
|
||||
.undefined => unreachable, // non-runtime value
|
||||
.void => unreachable, // non-runtime value
|
||||
.null => unreachable, // non-runtime value
|
||||
.@"unreachable" => unreachable, // non-runtime value
|
||||
.generic_poison => unreachable, // non-runtime value
|
||||
.empty_tuple => return,
|
||||
.false, .true => try code.append(gpa, switch (simple_value) {
|
||||
.false => 0,
|
||||
.true => 1,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user