mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-16 07:14:07 +10:00
calls within parameter lists
This commit is contained in:
@@ -29,4 +29,17 @@ var tally = make();
|
||||
|
||||
assert tally() == 1 && tally() == 2, "Closures failed";
|
||||
|
||||
|
||||
//expressions as arguments
|
||||
fn argFn() {
|
||||
return 42;
|
||||
}
|
||||
|
||||
fn outerFn(val) {
|
||||
assert val == 42, "expression as argument failed";
|
||||
}
|
||||
|
||||
outerFn(argFn());
|
||||
|
||||
|
||||
print "All good";
|
||||
Reference in New Issue
Block a user