I'm surprised that something as simple as this doesn't compile (under Xcode 10):
protocol Foo: Codable {}
struct Bar: Codable {
let foos: [Foo]
}
This fails to compile with:
Type 'Bar' does not conform to protocol 'Encodable'
Type 'Bar' does not conform to protocol 'Decodable'
Shouldn't these be automatically synthesized for such a simple case? Why doesn't this work?