Why doesn't array conform to Equatable, when its items are Equatable in Swift?
问题 UPDATE: As of Xcode 9.3, which includes Swift 4.1 , the array equality works as expected , and the code in the original question compiles without errors. However, please see the accepted answer , because it provides a better, more modern solution. The original question is below: When I try to declare an instance of a generic enum with type [Post] , I get an error saying Type '[Post]' does not conform to protocol 'Equatable' which is nonsense, because Post conforms to Equatable and I can