GDScript: Fix incorrect error message for utility functions

This commit is contained in:
Danil Alexeev
2023-06-30 20:40:02 +03:00
parent a574c0296b
commit 0c2202c56e
13 changed files with 167 additions and 59 deletions

View File

@@ -0,0 +1,2 @@
func test():
print(len(Color())) # GDScript utility function.

View File

@@ -0,0 +1,2 @@
GDTEST_ANALYZER_ERROR
Invalid argument for "len()" function: Value of type 'Color' can't provide a length.

View File

@@ -0,0 +1,2 @@
func test():
print(floor(Color())) # Built-in utility function.

View File

@@ -0,0 +1,2 @@
GDTEST_ANALYZER_ERROR
Invalid argument for "floor()" function: Argument "x" must be "int", "float", "Vector2", "Vector2i", "Vector3", "Vector3i", "Vector4", or "Vector4i".