File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff 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);
@@ -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.
Original file line number Diff line number Diff line change @@ -722,3 +722,15 @@ do {
722722 _ = value. data. key // Ok
723723 }
724724}
725+
726+ // rdar://110847476 - unrelated assignment and raw representable diagnostics
727+ do {
728+ struct Test < each Base : AsyncSequence > {
729+ let base : ( repeat each Base )
730+
731+ init ( base: repeat each Base ) {
732+ self . base = base
733+ // expected-error@-1 {{pack reference 'each Base' can only appear in pack expansion}}
734+ }
735+ }
736+ }
You can’t perform that action at this time.
0 commit comments