summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/tests/scripts/parser/features/lambda_named_callable.gd
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2021-09-21 14:13:24 +0200
committerGitHub <noreply@github.com>2021-09-21 14:13:24 +0200
commit82c12060b26d0045a5c7d9b3a1f94b29baf062ea (patch)
tree6d7305f3d976f0037f5dc0d73f578435493d35bd /modules/gdscript/tests/scripts/parser/features/lambda_named_callable.gd
parent91960b7b81523cb545b2dfb47c235cf21dd460f3 (diff)
parentc6ca09dc6f0fdf693c2a4445e556861691a81152 (diff)
downloadredot-engine-82c12060b26d0045a5c7d9b3a1f94b29baf062ea.tar.gz
Merge pull request #52718 from Calinou/gdscript-add-integration-tests-2
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")