mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Sema: remove unnecessary special case for dynamic method lookup
This commit is contained in:
@@ -1279,12 +1279,6 @@ ConstraintSystem::getTypeOfMemberReference(
|
|||||||
// For a static member referenced through a metatype or an instance
|
// For a static member referenced through a metatype or an instance
|
||||||
// member referenced through an instance, strip off the 'self'.
|
// member referenced through an instance, strip off the 'self'.
|
||||||
type = openedFnType->getResult();
|
type = openedFnType->getResult();
|
||||||
} else if (isDynamicResult && isa<AbstractFunctionDecl>(value)) {
|
|
||||||
// For a dynamic result referring to an instance function through
|
|
||||||
// an object of metatype type, replace the 'Self' parameter with
|
|
||||||
// a AnyObject member.
|
|
||||||
auto anyObjectTy = TC.Context.getAnyObjectType();
|
|
||||||
type = openedFnType->replaceSelfParameterType(anyObjectTy);
|
|
||||||
} else {
|
} else {
|
||||||
// For an unbound instance method reference, replace the 'Self'
|
// For an unbound instance method reference, replace the 'Self'
|
||||||
// parameter with the base type.
|
// parameter with the base type.
|
||||||
|
|||||||
Reference in New Issue
Block a user