Avatar
swiftbot BOT 7/27/2018 8:42 AM
Author icon
koher
struct Foo: Codable { private enum CodingKeys: CodingKey { case a } var a: Int private var _b: String }
Version:
swift-4.1.1-RELEASE
Output:
Error:
/usercode/main.swift:1:8: error: type 'Foo' does not conform to protocol 'Decodable' struct Foo: Codable { ^ Swift.Decodable:2:12: note: protocol requires initializer 'init(from:)' with type 'Decodable' public init(from decoder: Decoder) throws ^ /usercode/main.swift:6:17: note: cannot automatically synthesize 'Decodable' because '_b' does not have a matching CodingKey and does not have a default value private var _b: String ^