summaryrefslogtreecommitdiff
path: root/modules/gdscript/tests/scripts/analyzer
diff options
context:
space:
mode:
authorGeorge Marques <george@gmarqu.es>2022-05-24 13:40:36 -0300
committerGeorge Marques <george@gmarqu.es>2022-05-24 14:37:50 -0300
commit24bcbe971a39c5845be3a225f5c89c3a352775d2 (patch)
treecf4ce7bb8e88cdd9b5418d7771c9503c2e13fc19 /modules/gdscript/tests/scripts/analyzer
parentdf9dae240860d2342044f39ba6fc0dc2ba468703 (diff)
GDScript: Don't show redundant await warning on unknown types
Also avoid it when the type is known to be a signal.
Diffstat (limited to 'modules/gdscript/tests/scripts/analyzer')
-rw-r--r--modules/gdscript/tests/scripts/analyzer/features/await_with_signals_no_warning.gd12
-rw-r--r--modules/gdscript/tests/scripts/analyzer/features/await_with_signals_no_warning.out2
2 files changed, 14 insertions, 0 deletions
diff --git a/modules/gdscript/tests/scripts/analyzer/features/await_with_signals_no_warning.gd b/modules/gdscript/tests/scripts/analyzer/features/await_with_signals_no_warning.gd
new file mode 100644
index 0000000000..9a7c6a8250
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/features/await_with_signals_no_warning.gd
@@ -0,0 +1,12 @@
+# https://github.com/godotengine/godot/issues/54589
+# https://github.com/godotengine/godot/issues/56265
+
+extends Resource
+
+func test():
+ print("okay")
+ await self.changed
+ await unknown(self)
+
+func unknown(arg):
+ await arg.changed
diff --git a/modules/gdscript/tests/scripts/analyzer/features/await_with_signals_no_warning.out b/modules/gdscript/tests/scripts/analyzer/features/await_with_signals_no_warning.out
new file mode 100644
index 0000000000..2dc04a363e
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/features/await_with_signals_no_warning.out
@@ -0,0 +1,2 @@
+GDTEST_OK
+okay