summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/tests/scripts/parser/features/lambda_named_callable.gd
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gdscript/tests/scripts/parser/features/lambda_named_callable.gd')
-rw-r--r--modules/gdscript/tests/scripts/parser/features/lambda_named_callable.gd10
1 files changed, 10 insertions, 0 deletions
diff --git a/modules/gdscript/tests/scripts/parser/features/lambda_named_callable.gd b/modules/gdscript/tests/scripts/parser/features/lambda_named_callable.gd
new file mode 100644
index 0000000000..7971ca72a6
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/lambda_named_callable.gd
@@ -0,0 +1,10 @@
+func i_take_lambda(lambda: Callable, param: String):
+ lambda.call(param)
+
+
+func test():
+ var my_lambda := func this_is_lambda(x):
+ print("Hello")
+ print("This is %s" % x)
+
+ i_take_lambda(my_lambda, "a lambda")