You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
When adding a new public (or protected) member to an existing public class (or struct), these changes are not detected as source breaking changes by the baseline package validator. Such changes are not source compatible because consuming code may have inherited from that type and may have already added a member with the same name and signature and this would result in a CS0108 compiler warning that the inherited member is hidden.
Describe the solution you'd like
Introduce a new validation check that fails when a new public or protected member is added to a unsealed class or struct.
The text was updated successfully, but these errors were encountered:
bitbonk
changed the title
Adding a new public member to an unsealed public class is not detected as a breaking change
[API Compat] Adding a new public member to an unsealed public class is not detected as a breaking change
Feb 28, 2025
Is your feature request related to a problem? Please describe.
When adding a new public (or protected) member to an existing public class (or struct), these changes are not detected as source breaking changes by the baseline package validator. Such changes are not source compatible because consuming code may have inherited from that type and may have already added a member with the same name and signature and this would result in a CS0108 compiler warning that the inherited member is hidden.
Describe the solution you'd like
Introduce a new validation check that fails when a new public or protected member is added to a unsealed class or struct.
The text was updated successfully, but these errors were encountered: