Skip to content

Commit 91c013c

Browse files
committed
[CSSimplify] Don't record a fix if element/pattern type is a hole
The situation would already be "fixed" at the source.
1 parent d56e62d commit 91c013c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/Sema/CSSimplify.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6011,6 +6011,12 @@ bool ConstraintSystem::repairFailures(
60116011
}
60126012

60136013
case ConstraintLocator::SequenceElementType: {
6014+
if (lhs->isPlaceholder() || rhs->isPlaceholder()) {
6015+
recordAnyTypeVarAsPotentialHole(lhs);
6016+
recordAnyTypeVarAsPotentialHole(rhs);
6017+
return true;
6018+
}
6019+
60146020
// This is going to be diagnosed as `missing conformance`,
60156021
// so no need to create duplicate fixes.
60166022
if (rhs->isExistentialType())

0 commit comments

Comments
 (0)