Skip to content

Commit 834574d

Browse files
committed
Sema: Replace a couple of getTypeOfMember() calls
1 parent 490c26f commit 834574d

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

lib/Sema/ConstraintSystem.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1383,7 +1383,7 @@ getPropertyWrapperInformationFromOverload(
13831383
VarDecl *memberDecl;
13841384
std::tie(memberDecl, type) = *declInformation;
13851385
if (Type baseType = resolvedOverload.choice.getBaseType()) {
1386-
type = baseType->getTypeOfMember(memberDecl, type);
1386+
type = baseType->getRValueType()->getTypeOfMember(memberDecl, type);
13871387
}
13881388
return std::make_pair(decl, type);
13891389
}

lib/Sema/TypeCheckExprObjC.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -374,8 +374,9 @@ std::optional<Type> TypeChecker::checkObjCKeyPathExpr(DeclContext *dc,
374374

375375
Type newType;
376376
if (lookupType && !lookupType->isAnyObject()) {
377-
newType = lookupType->getTypeOfMember(type,
378-
type->getDeclaredInterfaceType());
377+
newType = type->getDeclaredInterfaceType().subst(
378+
lookupType->getContextSubstitutionMap(
379+
type->getDeclContext()));
379380
} else {
380381
newType = type->getDeclaredInterfaceType();
381382
}

0 commit comments

Comments
 (0)