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

No diagnostic for Obsoleted pctor-declared props when record body doesn't contain an attribute #76727

Open
xparadoxical opened this issue Jan 13, 2025 · 0 comments
Labels
Area-Compilers untriaged Issues and PRs which have not yet been triaged by a lead

Comments

@xparadoxical
Copy link

Version Used:
'4.14.0-ci (<developer build>)'. Language version: preview. (sharplab main 11 Jan 2025)
'4.12.0-3.24572.7 (dfa7fc6b)'. Language version: 13.0.

Steps to Reproduce:
(sharplab)

new R(true).B.Dump();
record R([property: Obsolete("a", true)] bool B);

Add anything with an attribute to the record to get a diagnostic (sharplab)

Diagnostic Id:
CS0619: 'R.B' is obsolete: 'a'

Expected Behavior:
Produces a diagnostic.
Actual Behavior:
Doesn't, unless the record contains anything with an attribute.

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Compilers untriaged Issues and PRs which have not yet been triaged by a lead labels Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

No branches or pull requests

1 participant