Skip to content

[5.3][ConstraintSystem] Always verify computed/resolved pattern types befo… #31614

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
May 7, 2020

Conversation

xedin
Copy link
Contributor

@xedin xedin commented May 7, 2020

…re use

Cherry-pick of #31604


  • Explanation: While trying to infer type for pattern always take result of
    getTypeForPattern and resolveTypeInExpressionContext with
    a grain of salt because both of these methods produce empty type
    if type as-written or one of the sub-pattern types is incorrect.

  • Scope: Type-checker stability improvements in constraint generation of patterns

  • Resolves: rdar://problem/60534522

  • Risk: Low

  • Testing: Unfortunately I couldn't find a test-case for this. These changes introduce multiple
    null checks.

  • Reviewer: @DougGregor

Resolves: rdar://problem/60534522
(cherry picked from commit f22ca72)

…re use

While trying to infer type for pattern always take result of
`getTypeForPattern` and `resolveTypeInExpressionContext` with
a grain of salt because both of these methods produce empty type
if type as-written or one of the sub-pattern types is incorrect.

Resolves: rdar://problem/60534522
(cherry picked from commit f22ca72)
@xedin xedin added the r5.3 label May 7, 2020
@xedin xedin requested a review from a team as a code owner May 7, 2020 07:19
@xedin
Copy link
Contributor Author

xedin commented May 7, 2020

@swift-ci please test

@xedin xedin merged commit d268f7b into swiftlang:release/5.3 May 7, 2020
@AnthonyLatsis AnthonyLatsis added swift 5.3 🍒 release cherry pick Flag: Release branch cherry picks 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.3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants