[GDScript] Correctly report invalid read-only access

This commit is contained in:
A Thousand Ships
2024-03-18 14:42:42 +01:00
parent 26738ea20d
commit c4e24d2b3b
6 changed files with 64 additions and 36 deletions

View File

@ -3,4 +3,4 @@ GDTEST_RUNTIME_ERROR
>> on function: test()
>> runtime/errors/constant_array_is_deep.gd
>> 6
>> Invalid assignment of property or key '0' with value of type 'int' on a base object of type 'Dictionary'.
>> Invalid assignment on read-only value (on base: 'Dictionary').

View File

@ -3,4 +3,4 @@ GDTEST_RUNTIME_ERROR
>> on function: test()
>> runtime/errors/constant_dictionary_is_deep.gd
>> 6
>> Invalid assignment of index '0' (on base: 'Array') with value of type 'int'.
>> Invalid assignment on read-only value (on base: 'Array').

View File

@ -3,4 +3,4 @@ GDTEST_RUNTIME_ERROR
>> on function: test()
>> runtime/errors/read_only_dictionary.gd
>> 4
>> Invalid assignment of property or key 'a' with value of type 'int' on a base object of type 'Dictionary'.
>> Invalid assignment on read-only value (on base: 'Dictionary').