Skip to content

Commit

Permalink
Add nested argument test.
Browse files Browse the repository at this point in the history
  • Loading branch information
munificent committed Feb 23, 2021
1 parent c6afb03 commit e581672
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/function/nested_call_with_arguments.lox
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
fun returnArg(arg) {
return arg;
}

fun returnFunCallWithArg(func, arg) {
return returnArg(func)(arg);
}

fun printArg(arg) {
print arg;
}

returnFunCallWithArg(printArg, "hello world"); // expect: hello world

0 comments on commit e581672

Please sign in to comment.