19 lines
No EOL
391 B
Text
19 lines
No EOL
391 B
Text
struct Foo {
|
|
field a
|
|
}
|
|
|
|
struct Bar {
|
|
Foo[1] foo
|
|
}
|
|
|
|
def isEqual(field a, field b) -> bool:
|
|
return a == b
|
|
|
|
def main(field a) -> field:
|
|
field b = (a + 5) * 6
|
|
assert(2 * b == a * 12 + 60)
|
|
field c = 7 * (b + a)
|
|
assert(isEqual(c, 7 * b + 7 * a))
|
|
field k = if [1f, 2] == [3f, 4] then 1 else 3 fi
|
|
assert([Bar { foo : [Foo { a: 42 }]}] == [Bar { foo : [Foo { a: 42 }]}])
|
|
return b + c |