Skip to content

Commit a3d67ba

Browse files
committed
[CSSimplify] Fix attempt to rebind type variables in sequence element pattern
(cherry picked from commit 70eeccb)
1 parent f457a7e commit a3d67ba

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/Sema/CSSimplify.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6232,8 +6232,10 @@ bool ConstraintSystem::repairFailures(
62326232
if (lhs->isAny()) {
62336233
rhs.visit([&](Type type) {
62346234
if (auto *typeVar = type->getAs<TypeVariableType>()) {
6235-
assignFixedType(typeVar,
6236-
PlaceholderType::get(getASTContext(), typeVar));
6235+
if (!getFixedType(typeVar)) {
6236+
assignFixedType(typeVar,
6237+
PlaceholderType::get(getASTContext(), typeVar));
6238+
}
62376239
}
62386240
});
62396241
}

0 commit comments

Comments
 (0)