-
Notifications
You must be signed in to change notification settings - Fork 4k
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 a diagnostic on missing body in partial property implementation #74224
Report a diagnostic on missing body in partial property implementation #74224
Conversation
partial class C | ||
{ | ||
public partial int Prop1 { get; set; } | ||
public partial int Prop1 { get => 1; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that we already have coverage for when a partial property has no accessors with bodies. In that case, the language considers it to be a definition part, and we don't want to report errors on the missing bodies. Basically, the adjusted code path is only going to be hit for partial properties which have 1 accessor with a body, 1 accessor without.
@dotnet/roslyn-compiler for second review of a small fix |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM Thanks (iteration 2)
Closes #74221