File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -2971,8 +2971,7 @@ BoundGenericType *KeyPathInst::getKeyPathType() const {
2971
2971
auto kpTy = getType ();
2972
2972
2973
2973
if (auto existential = kpTy.getAs <ExistentialType>()) {
2974
- auto containedTy = existential->getConstraintType ();
2975
- return containedTy->getExistentialLayout ()
2974
+ return existential->getExistentialLayout ()
2976
2975
.explicitSuperclass ->castTo <BoundGenericType>();
2977
2976
}
2978
2977
Original file line number Diff line number Diff line change @@ -5010,8 +5010,7 @@ namespace {
5010
5010
leafTy = fnTy->getResult ();
5011
5011
isFunctionType = true ;
5012
5012
} else if (auto *existential = exprType->getAs <ExistentialType>()) {
5013
- auto constrainedTy = existential->getConstraintType ();
5014
- auto layout = constrainedTy->getExistentialLayout ();
5013
+ auto layout = existential->getExistentialLayout ();
5015
5014
auto keyPathTy = layout.explicitSuperclass ->castTo <BoundGenericType>();
5016
5015
baseTy = keyPathTy->getGenericArgs ()[0 ];
5017
5016
leafTy = keyPathTy->getGenericArgs ()[1 ];
You can’t perform that action at this time.
0 commit comments