[SR-11491] Misleading error message when inserting [T] into Set<T> #53891
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
diagnostics QoI
Bug: Diagnostics Quality of Implementation
Environment
Apple Swift version 5.1 (swiftlang-1100.0.257.2 clang-1100.0.31.3)
Additional Detail from JIRA
md5: f505094c443eea2740b92e6ff1ed8831
Issue Description:
This code:
produces the following diagnostic:
The error is quite simple – you can't insert a list of elements as an element of a set, but those error messages were confusing enough that it took me some time to find what the error really was. Also IIUC it's not true that `insert` works only if `Element == AnyHashable`, so the message seems false as well.
The text was updated successfully, but these errors were encountered: