GDScript: Improve call analysis

* Add missing `UNSAFE_CALL_ARGUMENT` warning.
* Fix `Object` constructor.
* Display an error for non-existent static methods.
This commit is contained in:
Danil Alexeev
2023-09-21 12:42:55 +03:00
parent 59139df16e
commit e8696f9961
25 changed files with 184 additions and 46 deletions
@@ -0,0 +1,7 @@
# GH-73283
class MyClass:
pass
func test():
MyClass.not_existing_method()
@@ -0,0 +1,2 @@
GDTEST_ANALYZER_ERROR
Static function "not_existing_method()" not found in base "MyClass".
@@ -0,0 +1,4 @@
# GH-73213
func test():
print(Object())
@@ -0,0 +1,2 @@
GDTEST_ANALYZER_ERROR
Invalid constructor "Object()", use "Object.new()" instead.