Avatar
omochimetaru 8/4/2020 1:12 PM
@swift-main protocol P { static func foo() } extension P { static func foo() { print("static P.foo") } } extension Int: P {} func checkPE(_ a: P) { checkT(a) } func checkT<T>(_ a: T) { print(type(of: a) is P.Type) print(type(of: a) is P.Protocol) } checkPE(1)