Skip to content

[5.5][CSGen] Don't apply one-way requirement to typed patterns #38346

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 1 commit into from
Jul 13, 2021

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Jul 12, 2021

Cherry-pick of #38320


  • Explanation:

Typed patterns are represented by a name and a fixed contextual
type, let's not use intermediary type variable and one-way constraint
as its type because that variable would be bound right away to
contextual type. Also setting type of a variable declaration
to a type variable when contextual type is IUO doesn't play well
with overload resolution because it expects an optional type for
declarations with IUO attribute.

Resolves: rdar://80271666
(cherry picked from commit 66b1149)

Typed patterns are represented by a name and a fixed contextual
type, let's not use intermediary type variable and one-way constraint
as its type because that variable would be bound right away to
contextual type. Also setting type of a variable declaration
to a type variable when contextual type is IUO doesn't play well
with overload resolution because it expects an optional type for
declarations with IUO attribute.

Resolves: rdar://80271666
(cherry picked from commit 66b1149)
@xedin xedin added the r5.5 label Jul 12, 2021
@xedin xedin requested a review from a team as a code owner July 12, 2021 17:59
@xedin
Copy link
Contributor Author

xedin commented Jul 12, 2021

@swift-ci please clean test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 20a9469

@xedin
Copy link
Contributor Author

xedin commented Jul 12, 2021

@swift-ci please test macOS platform

@xedin
Copy link
Contributor Author

xedin commented Jul 12, 2021

@swift-ci please test Windows platform

1 similar comment
@xedin
Copy link
Contributor Author

xedin commented Jul 13, 2021

@swift-ci please test Windows platform

@xedin
Copy link
Contributor Author

xedin commented Jul 13, 2021

@swift-ci please nominate

@xedin xedin merged commit be5c13c into swiftlang:release/5.5 Jul 13, 2021
@AnthonyLatsis AnthonyLatsis added 🍒 release cherry pick Flag: Release branch cherry picks swift 5.5 labels Jan 8, 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 swift 5.5
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants