Skip to content

Commit 9e388b4

Browse files
committed
[CSSimplify] Check that raw type is not a hole before checking RawRepresentable conformance
Placeholder types just like type variables are set up to return a conformance ref which, in this case, would mean that we'd produce an invalid diagnostic.
1 parent b962cab commit 9e388b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Sema/CSSimplify.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5093,7 +5093,7 @@ bool ConstraintSystem::repairFailures(
50935093
if (auto objType = valueType->getOptionalObjectType())
50945094
valueType = objType;
50955095

5096-
if (rawReprType->isTypeVariableOrMember())
5096+
if (rawReprType->isTypeVariableOrMember() || rawReprType->isPlaceholder())
50975097
return false;
50985098

50995099
auto rawValue = isRawRepresentable(*this, rawReprType);

0 commit comments

Comments
 (0)