diff options
author | George Marques <george@gmarqu.es> | 2021-05-26 15:33:18 -0300 |
---|---|---|
committer | George Marques <george@gmarqu.es> | 2021-05-26 15:33:18 -0300 |
commit | a23fc45727544142cc15e7ab96596b159a5bac42 (patch) | |
tree | 3930ca4ad71f443ad05149a60415691e2040beff /modules/gdscript/tests/scripts | |
parent | 313e1f62bb4ed85041bcd9290ec76660878fcd6b (diff) |
GDScript: Fix function signature check for self calls
Diffstat (limited to 'modules/gdscript/tests/scripts')
-rw-r--r-- | modules/gdscript/tests/scripts/analyzer/features/call_self_get_name.gd | 9 | ||||
-rw-r--r-- | modules/gdscript/tests/scripts/analyzer/features/call_self_get_name.out | 3 |
2 files changed, 12 insertions, 0 deletions
diff --git a/modules/gdscript/tests/scripts/analyzer/features/call_self_get_name.gd b/modules/gdscript/tests/scripts/analyzer/features/call_self_get_name.gd new file mode 100644 index 0000000000..d21d8bce96 --- /dev/null +++ b/modules/gdscript/tests/scripts/analyzer/features/call_self_get_name.gd @@ -0,0 +1,9 @@ +extends Node + +func test(): + set_name("TestNodeName") + if get_name() == &"TestNodeName": + print("Name is equal") + else: + print("Name is not equal") + print(get_name() is StringName) diff --git a/modules/gdscript/tests/scripts/analyzer/features/call_self_get_name.out b/modules/gdscript/tests/scripts/analyzer/features/call_self_get_name.out new file mode 100644 index 0000000000..dc4348d9c3 --- /dev/null +++ b/modules/gdscript/tests/scripts/analyzer/features/call_self_get_name.out @@ -0,0 +1,3 @@ +GDTEST_OK +Name is equal +True |