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

Field-backed properties: support field references in speculative SemanticModel #75398

Open
cston opened this issue Oct 4, 2024 · 1 comment

Comments

@cston
Copy link
Member

cston commented Oct 4, 2024

Support field references in speculative SemanticModel for property accessors, including for auto-properties and partial properties.

This may require public API support to indicate that a statement or expression should be parsed in the context of an accessor, so that field is treated as keyword.

See related tests PropertyFieldKeywordTests.SpeculativeSemanticModel_* in earlier feature branch features/semi-auto-props.

See also #75904 (comment).

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Compilers untriaged Issues and PRs which have not yet been triaged by a lead labels Oct 4, 2024
@cston cston added this to the 17.13 milestone Oct 4, 2024
@jaredpar jaredpar added Bug New Feature - Field Keyword and removed untriaged Issues and PRs which have not yet been triaged by a lead labels Oct 7, 2024
@arunchndr arunchndr modified the milestones: 17.13, 17.13 P2 Nov 13, 2024
@CyrusNajmabadi
Copy link
Member

Note: i would not expect field in a spec semantic model to bind to anything, if the initial semantic model didn't have field in the prop. But i also would expect it to not crash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants