Skip to content

Commit 70eeccb

Browse files
committed
[CSSimplify] Fix attempt to rebind type variables in sequence element pattern
1 parent 1c3667b commit 70eeccb

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
@@ -6161,8 +6161,10 @@ bool ConstraintSystem::repairFailures(
61616161
if (lhs->isAny()) {
61626162
rhs.visit([&](Type type) {
61636163
if (auto *typeVar = type->getAs<TypeVariableType>()) {
6164-
assignFixedType(typeVar,
6165-
PlaceholderType::get(getASTContext(), typeVar));
6164+
if (!getFixedType(typeVar)) {
6165+
assignFixedType(typeVar,
6166+
PlaceholderType::get(getASTContext(), typeVar));
6167+
}
61666168
}
61676169
});
61686170
}

0 commit comments

Comments
 (0)