Skip to content

Commit b8915fa

Browse files
committed
[CSSimplify] Repair should ignore situations where assignment source or destination are a hole
If either source or destination type is a hole conversion should just be ignored because there is no r-value or other mismatch that could be diagnosed in this case.
1 parent 9e388b4 commit b8915fa

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/Sema/CSSimplify.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5350,6 +5350,11 @@ bool ConstraintSystem::repairFailures(
53505350
if (repairByUsingRawValueOfRawRepresentableType(lhs, rhs))
53515351
return true;
53525352

5353+
// If either side is a placeholder then let's consider this
5354+
// assignment correctly typed.
5355+
if (lhs->isPlaceholder() || rhs->isPlaceholder())
5356+
return true;
5357+
53535358
// Let's try to match source and destination types one more
53545359
// time to see whether they line up, if they do - the problem is
53555360
// related to immutability, otherwise it's a type mismatch.

0 commit comments

Comments
 (0)