Skip to content

[CSGen] A couple of improvements to pattern binding handling #38895

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

Merged
merged 2 commits into from
Aug 17, 2021

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Aug 16, 2021

  • Resolve binding pattern before using it
  • Fail early if pattern binding is incorrect

xedin added 2 commits August 16, 2021 13:47
This change makes constraint generation logic consistent with
how `PatternBindingEntryRequest::evaluate` handles pattern binding
entries.
It's possible for `TypeChecker::typeCheckPattern` to produce
either no type or type containing error. That should be detected
early and immediately fail constraint generation.
@xedin xedin requested a review from hborla August 16, 2021 20:55
@xedin
Copy link
Contributor Author

xedin commented Aug 16, 2021

@swift-ci please test source compatibility

@xedin
Copy link
Contributor Author

xedin commented Aug 16, 2021

@swift-ci please test

@xedin
Copy link
Contributor Author

xedin commented Aug 16, 2021

@swift-ci please test Windows platform

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 56e9fa6

@xedin
Copy link
Contributor Author

xedin commented Aug 16, 2021

@swift-ci please test macOS platform

@xedin
Copy link
Contributor Author

xedin commented Aug 17, 2021

Source compat suite failure is unrelated:

$ rm -rf /Users/buildnode/jenkins/workspace/swift-PR-source-compat-suite/swift-source-compat-suite/project_cache/Kickstarter-ReactiveExtensions
rm: /Users/buildnode/jenkins/workspace/swift-PR-source-compat-suite/swift-source-compat-suite/project_cache/Kickstarter-ReactiveExtensions: Directory not empty

@xedin xedin merged commit 487d59e into swiftlang:main Aug 17, 2021
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.

3 participants