Open
Description
Motivation
When a dictionary literal has duplicate entries (example: let map = [1: "one", 1: "also one"]
), the compile issues a warning "Dictionary literal of type '...' has duplicate entries for integer literal key '...'". But in this case the code at this point would crash, so a warning might not be enough. E.g. a CI pipeline might ignore warnings.
Proposed solution
"Dictionary literal of type '...' has duplicate entries for integer literal key '...'" should be an error and not a warning.
Alternatives considered
The only alternative is to leave it as a warning.
Additional information
Note that for duplicate entries of a dictionary, there also is the issue #77318 Missing warning "has duplicate entries for integer literal key" when literal keys are produced by a macro.