Skip to content

[5.2][CodeCompletion] Evaluate 'PatternBindingEntryRequest' before checking the init #28982

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

Conversation

rintaro
Copy link
Member

@rintaro rintaro commented Jan 2, 2020

Cherry-pick of #28949 into swift-5.2-branch originally reviewed by @CodaFi

rdar://problem/52105899

If a completion happens in an 'PatternBindingInitializer' context for
'TypedPattern' without any 'VarDecl', e.g.:

    let _: Int = <COMPLETION>

it crashes because 'typeCheckPatternBinding()' requires that the
'TypedPattern' has the type.

rdar://problem/52105899
(cherry picked from commit 091c36b)
@rintaro rintaro requested a review from a team January 2, 2020 20:17
@rintaro
Copy link
Member Author

rintaro commented Jan 2, 2020

@swift-ci Please test

@rintaro rintaro merged commit f447ed7 into swiftlang:swift-5.2-branch Jan 2, 2020
@rintaro rintaro deleted the 5.2-ide-completion-rdar52105899 branch January 13, 2020 19:23
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