Skip to content

Highlight await and return in top-level statements#60401

Merged
davidwengier merged 2 commits intodotnet:mainfrom
DoctorKrolic:highlight-await-in-top-level-statements
Mar 28, 2022
Merged

Highlight await and return in top-level statements#60401
davidwengier merged 2 commits intodotnet:mainfrom
DoctorKrolic:highlight-await-in-top-level-statements

Conversation

@DoctorKrolic
Copy link
Copy Markdown
Contributor

Fixes: #60400

@DoctorKrolic DoctorKrolic requested a review from a team as a code owner March 26, 2022 11:30
@ghost ghost added Community The pull request was submitted by a contributor who is not a Microsoft employee. Area-IDE labels Mar 26, 2022
@DoctorKrolic DoctorKrolic changed the title Highlight await in top-level statements Highlight await in top-level statements Mar 26, 2022
Copy link
Copy Markdown
Member

@Youssef1313 Youssef1313 left a comment

Choose a reason for hiding this comment

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

Does return get highlighted correctly?

Should IsReturnableConstruct be updated instead? This will require reviewing all its usages, so I don't feel strongly about it.

@DoctorKrolic
Copy link
Copy Markdown
Contributor Author

Does return get highlighted correctly?

Why do you ask about return in context of async-await? Is there some kind of connection between them or what?

Should IsReturnableConstruct be updated instead?

I don't think so. IsReturnableConstruct, as you said, is used in other places and in general it is just a simple SyntaxKind filter, while here a bit more complex logic is performed

@Youssef1313
Copy link
Copy Markdown
Member

Why do you ask about return in context of async-await? Is there some kind of connection between them or what?

Just that we fix two bugs together :)

@DoctorKrolic DoctorKrolic changed the title Highlight await in top-level statements Highlight await and return in top-level statements Mar 26, 2022
@davidwengier
Copy link
Copy Markdown
Member

Thanks for the contribution!

@davidwengier davidwengier merged commit 2aed89b into dotnet:main Mar 28, 2022
@ghost ghost added this to the Next milestone Mar 28, 2022
@DoctorKrolic DoctorKrolic deleted the highlight-await-in-top-level-statements branch March 28, 2022 13:57
@allisonchou allisonchou modified the milestones: Next, 17.2.P3 Mar 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-IDE Community The pull request was submitted by a contributor who is not a Microsoft employee.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

await is not highlighted in top-level statements when clicked

5 participants