GDScript: Improve error messages for invalid indexing
These errors are very common when using an invalid property name or calling on an object of the wrong type, and the previous message was a bit cryptic for users. Co-authored-by: Rémi Verschelde <rverschelde@gmail.com> Co-authored-by: golfinq <golfinqz@gmail.com>
This commit is contained in:
@@ -3,4 +3,4 @@ GDTEST_RUNTIME_ERROR
|
||||
>> on function: test()
|
||||
>> analyzer/errors/outer_class_constants.gd
|
||||
>> 8
|
||||
>> Invalid get index 'OUTER_CONST' (on base: 'GDScript').
|
||||
>> Invalid access to property or key 'OUTER_CONST' on a base object of type 'GDScript'.
|
||||
|
||||
@@ -3,4 +3,4 @@ GDTEST_RUNTIME_ERROR
|
||||
>> on function: test()
|
||||
>> analyzer/errors/outer_class_constants_as_variant.gd
|
||||
>> 9
|
||||
>> Invalid get index 'OUTER_CONST' (on base: 'GDScript').
|
||||
>> Invalid access to property or key 'OUTER_CONST' on a base object of type 'GDScript'.
|
||||
|
||||
@@ -3,4 +3,4 @@ GDTEST_RUNTIME_ERROR
|
||||
>> on function: test()
|
||||
>> analyzer/errors/outer_class_instance_constants.gd
|
||||
>> 8
|
||||
>> Invalid get index 'OUTER_CONST' (on base: 'RefCounted (Inner)').
|
||||
>> Invalid access to property or key 'OUTER_CONST' on a base object of type 'RefCounted (Inner)'.
|
||||
|
||||
+1
-1
@@ -3,4 +3,4 @@ GDTEST_RUNTIME_ERROR
|
||||
>> on function: test()
|
||||
>> analyzer/errors/outer_class_instance_constants_as_variant.gd
|
||||
>> 9
|
||||
>> Invalid get index 'OUTER_CONST' (on base: 'RefCounted (Inner)').
|
||||
>> Invalid access to property or key 'OUTER_CONST' on a base object of type 'RefCounted (Inner)'.
|
||||
|
||||
Reference in New Issue
Block a user