Avatar
Avatar
Iceman
@swift-main protocol P { static var type: String { get } var type: String { get } } struct S: P { static var type: String { "" } let type = Self.type }
swiftNightly BOT 10/17/2025 7:27 AM
exit status 1 with stderr:<stdin>:6:8: error: type 'S' does not conform to protocol 'P' 1 | protocol P { 2 | static var type: String { get } 3 | var type: String { get } | `- note: protocol requires property 'type' with type 'String' 4 | } 5 | 6 | struct S: P { | |- error: type 'S' does not conform to protocol 'P' | `- note: add stubs for conformance 7 | static var type: String { "" } | `- note: candidate operates on a type, not an instance as required 8 | let type = Self.type | `- note: candidate references itself 9 | } 10 |