On Sun, Nov 12, 2017 at 10:16 PM, Slava Pestov <[email protected]> wrote: > > Pardon my lack of imagination, but could you provide an example of a call > site that would become ambiguous? > > > protocol P {} > protocol Q {} > struct S : P, Q {} > > struct Outer { > static func foo(_: P) {} > > struct Inner { > static func foo(_: Q) {} > > static func bar() { > foo(S()) > } > } > } >
Resolves to Inner.foo just like it does today. We would still start from the innermost scope and work our way outward until we find a match. The only difference is we no longer stop partway up the chain *without* finding a match. If we do find a match then yes, of course we stop there and use it. Nevin
_______________________________________________ swift-evolution mailing list [email protected] https://lists.swift.org/mailman/listinfo/swift-evolution
