Avatar
Avatar
koher
@swift-4.1.3 @swift-5.0.3 @swift-5.2.5 @swift-5.4.3 @swift-5.5.3 protocol P { var value: Int? { get } } struct S: P { let value: Int = 42 }
exit status: 1 with stderr:<stdin>:5:8: error: type 'S' does not conform to protocol 'P' struct S: P { ^ <stdin>:6:9: note: candidate has non-matching type 'Int' let value: Int = 42 ^ <stdin>:2:9: note: protocol requires property 'value' with type 'Int?'; do you want to add a stub? var value: Int? { get } ^