mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
codegen: empty tuple can be stored in a runtime var
This commit is contained in:
parent
fbdcb2289b
commit
e5d78f0b55
1 changed files with 6 additions and 7 deletions
|
|
@ -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…
Add table
Reference in a new issue