Skip to content

Commit cdd526e

Browse files
committed
[Constraint System] Fix covariant erasure for constrained existentials
Use of an associated type in the member is not considered invariant if that associated type has been made concrete by the existential type.
1 parent ac134e4 commit cdd526e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Sema/ConstraintSystem.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2113,7 +2113,7 @@ typeEraseExistentialSelfReferences(
21132113
if (t->is<GenericTypeParamType>()) {
21142114
erasedTy = baseTy;
21152115
} else {
2116-
erasedTy = existentialSig->getNonDependentUpperBounds(t);
2116+
erasedTy = existentialSig->getDependentUpperBounds(t);
21172117
}
21182118

21192119
if (metatypeDepth) {

0 commit comments

Comments
 (0)