Handle case where write_bits is used without being applied

This commit is contained in:
microproofs
2025-01-11 17:14:10 +07:00
parent e437d70ae2
commit d559e384ec
3 changed files with 41 additions and 3 deletions

View File

@@ -15,3 +15,22 @@ test baz() {
let x = [0, 1, 2, 3]
write_bits(#"f0", x, True) == #"ff"
}
test bur() {
let x =
if True {
[0, 1, 2, 3]
} else {
[0, 1]
}
if False {
fn(_a, _b, _c) { #"" }
} else {
write_bits
}(
#"f0",
x,
True,
) == #"ff"
}