aqua/aqua-src/antithesis.aqua
2023-10-25 17:41:09 +07:00

35 lines
564 B
Plaintext

aqua A
export bugLNG260
func create(a: i8) -> -> i8:
closureArrow = () -> i8:
<- a
<- closureArrow
func test() -> i8, i8:
arr1 <- create(1)
arr2 <- create(2)
<- arr1(), arr2()
func cmp(a: i32, b: i32, pred: i8 -> bool) -> bool:
result: ?bool
if a < b:
result <- pred(-1)
else:
if a == b:
result <- pred(0)
else:
result <- pred(1)
<- result!
func gt(a: i32, b: i32) -> bool:
pred = (ord: i8) -> bool:
<- ord > 0
<- cmp(a, b, pred)
func bugLNG260(a: i32, b: i32) -> bool:
<- gt(a, b)