aqua/aqua-src/antithesis.aqua

35 lines
564 B
Plaintext
Raw Normal View History

aqua A
export bugLNG260
2023-10-25 10:41:09 +00:00
func create(a: i8) -> -> i8:
closureArrow = () -> i8:
<- a
<- closureArrow
func test() -> i8, i8:
arr1 <- create(1)
arr2 <- create(2)
<- arr1(), arr2()
2023-10-24 09:40:23 +00:00
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)