Why does the expression
import Foundation
["a", "b", "c"] == ["c", "b", "a"]
evaluate to true in a Swift playground?
(The expression evaluates to false when Foundation is not imported.)
Josh's answer is close, but not quite right. Option-click on the equals operator. Your literals are Foundation.CharacterSet
s.
public static func == (lhs: CharacterSet, rhs: CharacterSet) -> Bool
For literal resolution, the compiler is going to search
Is this a bug of ambiguity? Yes. Is it resolvable? I doubt it. I bet it's broken because nobody has been able to get the performance to be good enough if it did an exhaustive search. But please, log a bug, find out, and report back!