Skip to content

[5.8][CSClosure] A couple of closure related fixes #62842

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
Jan 5, 2023

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Jan 4, 2023

Cherry-pick of #60806
Cherry-pick of #62773


  • Fix handling of non-representativate variables
  • Fix sub-pattern matching logic related closure and enum element

Resolves: rdar://83418797
Resolves: #62777

takeshi-1000 and others added 2 commits January 4, 2023 09:55
…element (swiftlang#62777)

* [CSSimplify] fix pattern matching logic which is as part of the enum element for closure

* add test

* Fixed logic to apply to N levels of nesting

* update tests that take into account N levels of nesting.

* fix indentation

* use dynamic variables and uppdate some logic

* Revert "use dynamic variables and uppdate some logic"

This reverts commit 279dc4f.

* fix logic to only see pattern matches

* clean up unnecessary logic

Co-authored-by: Luciano Almeida <[email protected]>

* Clean up unnecessary logic(2)

* remove dropping

* Fix documentation comments to match current context

* clean up unnecessary logic

* remove comments

Co-authored-by: Luciano Almeida <[email protected]>
(cherry picked from commit 29bf82e)
All of the type variables referenced by a type had to be
handled by `inferVariables` otherwise it would to possible
to bring non-representative variable into scope which in
turn later would get simplied into a variable that doesn't
exist in the active scope and solver would crash.

Resolves: rdar://83418797
(cherry picked from commit 4789369)
@xedin xedin added the r5.8 label Jan 4, 2023
@xedin xedin requested a review from hborla January 4, 2023 18:12
@xedin
Copy link
Contributor Author

xedin commented Jan 4, 2023

@swift-ci please test

@xedin xedin merged commit 3ff539b into swiftlang:release/5.8 Jan 5, 2023
@AnthonyLatsis AnthonyLatsis added 🍒 release cherry pick Flag: Release branch cherry picks swift 5.8 labels Jan 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants