diff options
author | George Marques <george@gmarqu.es> | 2022-05-23 21:13:25 -0300 |
---|---|---|
committer | George Marques <george@gmarqu.es> | 2022-05-23 21:13:25 -0300 |
commit | 969f1980d29cfc48c45a1bebdc98935b641dda50 (patch) | |
tree | 278acf1dea945977dda56bb1a1c1342b2093befa /modules/gdscript/tests | |
parent | 0a28b4cd94540e1b99ccd79a70bd37170e1cb614 (diff) |
GDScript: Fix `if` after lambda being seen as ternary
Diffstat (limited to 'modules/gdscript/tests')
-rw-r--r-- | modules/gdscript/tests/scripts/parser/features/if_after_lambda.gd | 7 | ||||
-rw-r--r-- | modules/gdscript/tests/scripts/parser/features/if_after_lambda.out | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/modules/gdscript/tests/scripts/parser/features/if_after_lambda.gd b/modules/gdscript/tests/scripts/parser/features/if_after_lambda.gd new file mode 100644 index 0000000000..f5e26ab1ab --- /dev/null +++ b/modules/gdscript/tests/scripts/parser/features/if_after_lambda.gd @@ -0,0 +1,7 @@ +# https://github.com/godotengine/godot/issues/61231 + +func test(): + var my_lambda = func(): + print("hello") + if 0 == 0: + my_lambda.call() diff --git a/modules/gdscript/tests/scripts/parser/features/if_after_lambda.out b/modules/gdscript/tests/scripts/parser/features/if_after_lambda.out new file mode 100644 index 0000000000..58774d2d3f --- /dev/null +++ b/modules/gdscript/tests/scripts/parser/features/if_after_lambda.out @@ -0,0 +1,2 @@ +GDTEST_OK +hello |