mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[ConstraintSystem] Fix isPartialApplication to properly handle static members
Only instance members require double-apply to be fully applied, static members apply the base implicitly.
This commit is contained in:
@@ -2469,7 +2469,10 @@ bool ConstraintSystem::isPartialApplication(ConstraintLocator *locator) {
|
||||
|
||||
auto baseTy =
|
||||
simplifyType(getType(UDE->getBase()))->getWithoutSpecifierType();
|
||||
return getApplicationLevel(*this, baseTy, UDE) < 2;
|
||||
auto level = getApplicationLevel(*this, baseTy, UDE);
|
||||
// Static members have base applied implicitly which means that their
|
||||
// application level is lower.
|
||||
return level < (baseTy->is<MetatypeType>() ? 1 : 2);
|
||||
}
|
||||
|
||||
DeclReferenceType
|
||||
|
||||
Reference in New Issue
Block a user