21 lines
419 B
Text
21 lines
419 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 = [1f, 2] == [3f, 4] ? 1 : 3;
|
|
assert([Bar { foo : [Foo { a: 42 }]}] == [Bar { foo : [Foo { a: 42 }]}]);
|
|
return b + c;
|
|
}
|