diff --git a/test/function/nested_call_with_arguments.lox b/test/function/nested_call_with_arguments.lox new file mode 100644 index 000000000..efa607d8a --- /dev/null +++ b/test/function/nested_call_with_arguments.lox @@ -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