Open kleonc opened 2 years ago
Same vein as https://github.com/godotengine/godot/issues/44471 Possible duplicate of https://github.com/godotengine/godot/issues/24215
In most programing language Dictionary keys are immutable, So we can implement same into GD script by raising exception when Dictionary key is mutable(like Array). For using Array as key we can have method in Array which serializes Array into sting which can be used as key.
How does that sound @Zylann
@RedHeadphone I commented on that here https://github.com/godotengine/godot/issues/24215#issuecomment-445412993
Godot version
3.4.4.stable, 3.5.beta3
System information
N/A
Issue description
Title.
Dictionary
can end up with duplicate keys (many dict entries with the same key). For details see the output of the test script below.Steps to reproduce
Test script:
Output:
Minimal reproduction project
DictDuplicateKeys.zip