The problem is that the ==
operator for dictionaries requires that both the key and the Equatable
value Equatable
:
func ==<Key : Equatable, Value : Equatable>(lhs: [Key : Value], rhs: [Key : Value]) -> Bool
but AnyObject
does not match Equatable
.
A simple fix is to replace the dictionary type [String: AnyObject]
[String : NSObject]
, then your code compiles without problems.
source share