Commits

Slava Pestov committed 6171df6a135
Sema: Don't favor extension methods over protocol requirements This bug triggered when three pre-conditions held: - A protocol requirement method signature involves archetypes built from associated types - A protocol extension provides a default implementation of this method - The method is called from another method in the same extension, with a parameter of the associated type In this case, the archetypes in the signature would match exactly and we would end up picking the extension method over the protocol method, which would not even be considered. As a result, the extension method would be dispatch statically instead of using witness method dispatch, which is wrong. Hopefully one day we can model default implementations as real overrides and not overloads. Note that the test is a SILGen test even though the bug is in Sema, since its easier to detect the problem at the SIL level. Fixes <rdar://problem/21995666>. Swift SVN r30847