Avatar
@swift-5.1.5 protocol P1 {} protocol P2 {} extension Int : P1 {} extension Int : P2 {} func f() -> some P1 { return Int(0) } func f() -> some P2 { return Int(0) } func r<T: P1>(_ a: T) { print(a) } r(f()) (edited)