aqua-playground/aqua/examples/closureReturnRename.aqua

16 lines
309 B
Plaintext

export lng193Bug
func getClosure(arg: u16, peer: string) -> u16 -> u16:
on peer:
closure = (x: u16) -> u16:
<- arg + x
<- closure
func lng193Bug(peer: string, closurePeer: string) -> u16:
on peer:
c = getClosure(42, closurePeer)
b = c
a = b
res = a(1) + b(2) + c(3)
<- res