diff options
author | rune-scape <allie.smith.epic@gmail.com> | 2022-12-12 07:27:41 -0500 |
---|---|---|
committer | rune-scape <allie.smith.epic@gmail.com> | 2022-12-12 07:27:41 -0500 |
commit | 08449ab16ecba2c04511b5da464f75d241eaff95 (patch) | |
tree | 98f340abdb02b8a2c16ee33000061b7ff9bb9686 /modules/gdscript/tests/scripts/analyzer | |
parent | 97df6de4a77393069c639a57d22bebb2f6f54680 (diff) |
Fix String type compatibility being too permissive
Diffstat (limited to 'modules/gdscript/tests/scripts/analyzer')
-rw-r--r-- | modules/gdscript/tests/scripts/analyzer/features/array_string_stringname_equivalent.gd | 7 | ||||
-rw-r--r-- | modules/gdscript/tests/scripts/analyzer/features/array_string_stringname_equivalent.out | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/modules/gdscript/tests/scripts/analyzer/features/array_string_stringname_equivalent.gd b/modules/gdscript/tests/scripts/analyzer/features/array_string_stringname_equivalent.gd index 4511c3d10b..eb0003eed8 100644 --- a/modules/gdscript/tests/scripts/analyzer/features/array_string_stringname_equivalent.gd +++ b/modules/gdscript/tests/scripts/analyzer/features/array_string_stringname_equivalent.gd @@ -1,4 +1,11 @@ + +var m_string_array: Array[String] = [&"abc"] +var m_stringname_array: Array[StringName] = ["abc"] + func test(): + print(m_string_array) + print(m_stringname_array) + # Converted to String when initialized var string_array: Array[String] = [&"abc"] print(string_array) diff --git a/modules/gdscript/tests/scripts/analyzer/features/array_string_stringname_equivalent.out b/modules/gdscript/tests/scripts/analyzer/features/array_string_stringname_equivalent.out index 70dd01d88e..09c199bde1 100644 --- a/modules/gdscript/tests/scripts/analyzer/features/array_string_stringname_equivalent.out +++ b/modules/gdscript/tests/scripts/analyzer/features/array_string_stringname_equivalent.out @@ -1,3 +1,5 @@ GDTEST_OK ["abc"] [&"abc"] +["abc"] +[&"abc"] |