Skip to content

[AST] Be lenient with PatternBindingIntializer without PatBindingDecl #26546

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
Aug 13, 2019

Conversation

rintaro
Copy link
Member

@rintaro rintaro commented Aug 7, 2019

PatternBindingInitializer may not be attached to any PatternBindingDecl. e.g.

struct S {
    @CustomAttr(something)
}

In this case DeclContext for something is PatternBindingInitializer, but it doesn't have PatternBindingDecl because it's not written yet.

Fixes a crash in code-completion.

rdar://problem/53034550

@rintaro
Copy link
Member Author

rintaro commented Aug 7, 2019

@swift-ci Please smoke test

@rintaro rintaro requested a review from DougGregor August 7, 2019 22:21
@rintaro
Copy link
Member Author

rintaro commented Aug 8, 2019

@swift-ci Please smoke test macOS platform

@rintaro rintaro force-pushed the ide-completion-rdar53034550 branch from f694bbc to 055c2b5 Compare August 8, 2019 17:47
PatternBindingInitializer may not be attached to any
PatternBindingDecl. e.g.

  struct S {
    @CustomAttr(something)
  }

In this case DeclContext for 'something' is PatternBindingInitializer,
but it doesn't have PatternBindingDecl because it's not written yet.

Fixes a crash in code-completion.

rdar://problem/53034550
@rintaro rintaro force-pushed the ide-completion-rdar53034550 branch from 055c2b5 to 428bbe1 Compare August 8, 2019 17:49
@rintaro
Copy link
Member Author

rintaro commented Aug 8, 2019

@swift-ci Please smoke test

@rintaro
Copy link
Member Author

rintaro commented Aug 13, 2019

@swift-ci Please smoke test

@rintaro rintaro merged commit 0555d30 into swiftlang:master Aug 13, 2019
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