1
0
Fork 0
mirror of synced 2025-09-23 12:18:44 +00:00
This commit is contained in:
schaeff 2019-12-27 17:43:40 +01:00
parent 718a2d2e7f
commit c3b00ee75c
2 changed files with 26 additions and 0 deletions

View file

@ -0,0 +1,15 @@
{
"entry_point": "./tests/tests/complex_call.zok",
"tests": [
{
"input": {
"values": ["1", "2", "0", "1", "2", "3", "4"]
},
"output": {
"Ok": {
"values": ["1", "1", "3", "4"]
}
}
}
]
}

View file

@ -0,0 +1,11 @@
struct Foo {
bool[2] a
field b
}
def f(bool a, field b, Foo c, field[2] d) -> (Foo, field):
return Foo { a: [a, a], b: d[0] }, if c.a[0] then b + c.b else d[1] fi
def main(bool a, field b, Foo c, field[2] d) -> (Foo, field):
e, f = f(a, b, c, d)
return e, f