Skip to content
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

Report diagnostic for field and value in property accessors when used as primary expressions only #74164

Merged
merged 2 commits into from
Jun 27, 2024

Conversation

cston
Copy link
Member

@cston cston commented Jun 26, 2024

Report a diagnostic for field and value in contexts where the identifiers will be treated as keywords in a later language version and where the meaning will change as a result.

This modifies the earlier change from #73570 to only report a diagnostic when the identifier is a primary expression, since it is assumed the parser will only treat field and value as keywords in those cases.

@cston cston requested a review from a team as a code owner June 26, 2024 05:07
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Compilers untriaged Issues and PRs which have not yet been triaged by a lead labels Jun 26, 2024
@cston cston force-pushed the keywords-primary-expr-only branch from 36d1f89 to ce4478c Compare June 26, 2024 05:11
@cston cston changed the title Parse field and value as keywords in primary expressions only Report diagnostic for field and value in property accessors when used as primary expressions only Jun 26, 2024
@cston cston requested review from RikkiGibson and a team June 27, 2024 14:04
@cston cston merged commit 5d8b9b8 into dotnet:main Jun 27, 2024
24 checks passed
@cston cston deleted the keywords-primary-expr-only branch June 27, 2024 19:04
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Jun 27, 2024
@RikkiGibson RikkiGibson modified the milestones: Next, 17.12 P1 Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers New Feature - Field Keyword untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants