Merge pull request #24587 from jacobly0/x86_64

x86_64: fix some bugs
This commit is contained in:
Andrew Kelley
2025-07-26 18:41:29 -07:00
committed by GitHub
2 changed files with 40 additions and 21 deletions

View File

@@ -1072,3 +1072,13 @@ test "switch on a signed value smaller than the smallest prong value" {
else => {},
}
}
test "switch on 8-bit mod result" {
var x: u8 = undefined;
x = 16;
switch (x % 4) {
0 => {},
1, 2, 3 => return error.TestFailed,
else => unreachable,
}
}