[Sema] Inject implicit ParenExpr for unresolved member chains

In order to give unresolved member chain result types visibility in the AST, we inject an implicit ParenExpr in CSGen that lives only for the duration of type checking, and gets removed during solution application.
This commit is contained in:
Frederick Kellison-Linn
2020-07-31 18:02:23 -04:00
parent aedde34fec
commit 4e9b7b20db
4 changed files with 47 additions and 11 deletions

View File

@@ -4306,6 +4306,9 @@ bool ConstraintSystem::repairFailures(
break;
}
case ConstraintLocator::RValueAdjustment:
return true;
case ConstraintLocator::UnresolvedMemberChainResult: {
if (repairViaOptionalUnwrap(*this, lhs, rhs, matchKind, conversionsOrFixes,
locator))