[ConstraintSystem] Detect and diagnose missing generic arguments

Introduce a fix to detect and diagnose situations when omitted
generic arguments couldn't be deduced by the solver based on
the enclosing context.

Example:

```swift
struct S<T> {
}

_ = S() // There is not enough context to deduce `T`
```

Resolves: rdar://problem/51203824
This commit is contained in:
Pavel Yaskevich
2019-05-29 15:21:15 -07:00
parent 636b4ceeb2
commit c30845fa74
24 changed files with 342 additions and 84 deletions

View File

@@ -6659,6 +6659,7 @@ ConstraintSystem::SolutionKind ConstraintSystem::simplifyFixConstraint(
case FixKind::AllowAnyObjectKeyPathRoot:
case FixKind::TreatKeyPathSubscriptIndexAsHashable:
case FixKind::AllowInvalidRefInKeyPath:
case FixKind::ExplicitlySpecifyGenericArguments:
llvm_unreachable("handled elsewhere");
}