Add writeBits back in and use the optimizer to utilize the list conversion

This commit is contained in:
microproofs
2025-01-10 12:11:19 +07:00
parent 19d0ec23cf
commit f7f68fbafc
8 changed files with 238 additions and 67 deletions

View File

@@ -0,0 +1,2 @@
name = "aiken-lang/acceptance_test_117"
version = "0.0.0"

View File

@@ -0,0 +1,17 @@
use aiken/builtin.{write_bits}
test bar() {
let x =
if True {
[0, 1, 2, 3]
} else {
[0, 1]
}
write_bits(#"f0", x, True) == #"ff"
}
test baz() {
let x = [0, 1, 2, 3]
write_bits(#"f0", x, True) == #"ff"
}