Hi everybody,
Given this very simple example:
protocol Fragment: Codable {}
struct NaviState: Codable { <-- Type 'NaviState' does not conform to protocol 'Decodable'
var path: [Fragment]
}
Common sense says it should conform to the Codable protocol, since we have a protocol that guarantees conformance (Fragment) and only one single field, (path) which is an array codable as long as it has codable elements.
Still, the compiler doesn't agree. Can someone help me understand why?