diff options
| author | Rémi Verschelde <rverschelde@gmail.com> | 2022-12-09 18:06:48 +0100 |
|---|---|---|
| committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-12-09 18:06:48 +0100 |
| commit | 907298d673723d7d957c382647dedde66c29ecd2 (patch) | |
| tree | 62537ac5e18b24834e8231a57a73e20ea4ec1535 /modules/gdscript/tests/scripts/analyzer/errors | |
| parent | 597e0c0fb9c4bd725dae1fca75875ec4c936079f (diff) | |
| parent | e79be6ce07ed8c89011f759ecade070a3bd5a806 (diff) | |
Merge pull request #68747 from rune-scape/rune-stringname-unification
GDScript: Unify StringName and String
Diffstat (limited to 'modules/gdscript/tests/scripts/analyzer/errors')
2 files changed, 11 insertions, 0 deletions
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/dictionary_string_stringname_equivalent.gd b/modules/gdscript/tests/scripts/analyzer/errors/dictionary_string_stringname_equivalent.gd new file mode 100644 index 0000000000..4dd2b556ee --- /dev/null +++ b/modules/gdscript/tests/scripts/analyzer/errors/dictionary_string_stringname_equivalent.gd @@ -0,0 +1,9 @@ +# https://github.com/godotengine/godot/issues/62957 + +func test(): + var dict = { + &"key": "StringName", + "key": "String" + } + + print("Invalid dictionary: %s" % dict) diff --git a/modules/gdscript/tests/scripts/analyzer/errors/dictionary_string_stringname_equivalent.out b/modules/gdscript/tests/scripts/analyzer/errors/dictionary_string_stringname_equivalent.out new file mode 100644 index 0000000000..189d8a7955 --- /dev/null +++ b/modules/gdscript/tests/scripts/analyzer/errors/dictionary_string_stringname_equivalent.out @@ -0,0 +1,2 @@ +GDTEST_ANALYZER_ERROR +Key "key" was already used in this dictionary (at line 5). |