Add checks for polymorphic/higher order oracles and higher order entrypoints (AEVM)
This commit is contained in:
@@ -50,7 +50,7 @@ contract ComplexTypes =
|
||||
entrypoint remote_pair(n : int, s : string) : int * string =
|
||||
state.worker.pair(gas = 10000, n, s)
|
||||
|
||||
entrypoint map(f, xs) =
|
||||
function map(f, xs) =
|
||||
switch(xs)
|
||||
[] => []
|
||||
x :: xs => f(x) :: map(f, xs)
|
||||
|
||||
@@ -91,10 +91,11 @@ contract Identity =
|
||||
// }
|
||||
// let id(x) = x
|
||||
// let main(xs) = map(double,xs)
|
||||
entrypoint z(f,x) = x
|
||||
function z(f,x) = x
|
||||
function s(n) = (f,x)=>f(n(f,x))
|
||||
function add(m,n) = (f,x)=>m(f,n(f,x))
|
||||
entrypoint main(_) =
|
||||
|
||||
entrypoint main() =
|
||||
let three=s(s(s(z)))
|
||||
add(three,three)
|
||||
(((i)=>i+1),0)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
contract TuplesMatch =
|
||||
|
||||
entrypoint tuplify3() = (t) => switch(t)
|
||||
function tuplify3() = (t) => switch(t)
|
||||
(x, y, z) => 3
|
||||
|
||||
entrypoint fst(p : int * string) =
|
||||
|
||||
Reference in New Issue
Block a user