mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Sema] Don't assume member refs have base types
- Add a precondition on `doesDeclRefApplyCurriedSelf` to expect a member decl, and rename it to make the precondition explicit. - Don't assume that not having a base type means this isn't a member reference, as member references to static operators don't have base types. Resolves SR-10843.
This commit is contained in:
@@ -1222,7 +1222,7 @@ ConstraintSystem::getTypeOfMemberReference(
|
||||
|
||||
// Check to see if the self parameter is applied, in which case we'll want to
|
||||
// strip it off later.
|
||||
auto hasAppliedSelf = doesDeclRefApplyCurriedSelf(baseObjTy, value);
|
||||
auto hasAppliedSelf = doesMemberRefApplyCurriedSelf(baseObjTy, value);
|
||||
|
||||
baseObjTy = baseObjTy->getMetatypeInstanceType();
|
||||
FunctionType::Param baseObjParam(baseObjTy);
|
||||
|
||||
Reference in New Issue
Block a user