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
No known key found for this signature in database
GPG key ID: 124453E157DA8DC7
25 changed files with 184 additions and 46 deletions

View file

@ -0,0 +1,7 @@
# GH-73283
class MyClass:
pass
func test():
MyClass.not_existing_method()

View file

@ -0,0 +1,2 @@
GDTEST_ANALYZER_ERROR
Static function "not_existing_method()" not found in base "MyClass".

View file

@ -0,0 +1,4 @@
# GH-73213
func test():
print(Object())

View file

@ -0,0 +1,2 @@
GDTEST_ANALYZER_ERROR
Invalid constructor "Object()", use "Object.new()" instead.