Skip to content

[Parse] Don't skip '}' when recovering from 'default' outside 'switch' #38036

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
Jun 25, 2021

Conversation

rintaro
Copy link
Member

@rintaro rintaro commented Jun 22, 2021

That caused assertion failures in code completion.

rdar://78781163

@rintaro
Copy link
Member Author

rintaro commented Jun 22, 2021

@swift-ci Please smoke test

@rintaro rintaro requested a review from ahoppen June 22, 2021 21:55
Copy link
Member

@ahoppen ahoppen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable to me.

@@ -517,7 +517,7 @@ static ParserResult<Stmt> recoverFromInvalidCase(Parser &P) {
assert(P.Tok.is(tok::kw_case) || P.Tok.is(tok::kw_default)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you also need to adjust the doc comment consuming up to the next ':' or '}'

That caused assertion failures in code completion.

rdar://78781163
@rintaro rintaro force-pushed the ide-completion-rdar78781163 branch from 9a6a409 to aa182ac Compare June 23, 2021 15:44
@rintaro
Copy link
Member Author

rintaro commented Jun 23, 2021

@swift-ci Please smoke test

@rintaro
Copy link
Member Author

rintaro commented Jun 23, 2021

@swift-ci Please smoke test macOS

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