Skip to content

Commit db3c74c

Browse files
committed
Sema: remove unnecessary special case for dynamic method lookup
1 parent 0b9ad51 commit db3c74c

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

lib/Sema/ConstraintSystem.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1279,12 +1279,6 @@ ConstraintSystem::getTypeOfMemberReference(
12791279
// For a static member referenced through a metatype or an instance
12801280
// member referenced through an instance, strip off the 'self'.
12811281
type = openedFnType->getResult();
1282-
} else if (isDynamicResult && isa<AbstractFunctionDecl>(value)) {
1283-
// For a dynamic result referring to an instance function through
1284-
// an object of metatype type, replace the 'Self' parameter with
1285-
// a AnyObject member.
1286-
auto anyObjectTy = TC.Context.getAnyObjectType();
1287-
type = openedFnType->replaceSelfParameterType(anyObjectTy);
12881282
} else {
12891283
// For an unbound instance method reference, replace the 'Self'
12901284
// parameter with the base type.

0 commit comments

Comments
 (0)