Avatar
@swift-main protocol P { func f(_: Int) func f(_: Int, _: Int) } extension P { func f(_ aa: Int) { print(2) } } struct S: P { func f(_ aa: Int, _ bb: Int = 0) { print(1) } } let s: S = S() s.f(42) let p: P = s p.f(42)