Skip to content

[5.1 06/12][ConstraintSystem] Detect and diagnose missing generic arguments #25486

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Jun 14, 2019

  • Explanation: 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:

struct S<T> {
}

_ = S() // There is not enough context to deduce `T`
  • Issue: rdar://problem/51203824, rdar://problem/50512161

  • Scope: Diagnostics, in subset of cases where solver couldn't resolve some of the arguments for generic parameters

  • Risk: Low.

  • Testing: Added compiler regression tests and adjusted existing ones.

  • Reviewed by: @DougGregor, @slavapestov

Resolves: rdar://problem/51203824
Resolves: rdar://problem/50512161
(cherry picked from commit bfe1987)

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
(cherry picked from commit bfe1987)
@xedin
Copy link
Contributor Author

xedin commented Jun 14, 2019

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - fafdcf0

@xedin
Copy link
Contributor Author

xedin commented Jun 14, 2019

@swift-ci please test macOS platform

@xedin xedin merged commit 0ab390f into swiftlang:swift-5.1-branch-06-12-2019 Jun 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants