Created
October 16, 2021 10:23
-
-
Save berikv/c4eb33f3316c4a9fb0638981b53bfadb to your computer and use it in GitHub Desktop.
Static member cannot be used on protocol metatype
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protocol P {} | |
struct S: P {} | |
extension P { | |
static var a: P { S() } | |
} | |
let v = P.a | |
// error: static member 'a' cannot be used on protocol metatype 'P.Protocol' | |
// let v = P.a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment