Commits

Slava Pestov committed 72c44b4c847
Sema: Fix getTypeOfMemberReference() for unbound instance methods Always rewrite the Self type to the base type. Previously we only did it if the method had a dynamic self return. This caused some confusing behavior in this case: class C { func m1() {} func m2() -> Self {} } class D : C {} The types of D.m1 and D.m2 are: - D.m1: C -> () -> () - D.m2: D -> () -> D For protocols, this also meant that the type of an instance method reference P.f had an open existential that could "leak out" of the OpenExistentialExpr. Now, P.f will have type P -> ... -> ..., however using such a reference still crashes, just in SILGen instead of Sema, because we don't generate the right thunks yet. Progress on <rdar://problem/21289579>. Swift SVN r29447