Closed rhys-vdw closed 1 month ago
I've added this to our backlog, and I've added the "help wanted" label. We should mention this. It's because the declaration is in the base class, not the derived class.
@BillWagner I will work on this!
Hi @BartoszKlonowski
I've assigned it to you.
Can I instead request that the attribute is recognised? (ObsoleteAttribute
is [AttributeUsage(..., Inherited = false)]
after all...)
My use-case is to indicate that the "generic" object.Equals(object?)
overload shouldn't be used because, to preserve commutativity, it only mimics the IEquatable<TSelf>.Equals
overload, and not the additional IEquatable<int>.Equals
overload—that is, instance.Equals(1)
may resolve to the wrong overload and always return false
.
Can I instead request that the attribute is recognised?
Not an expert on how this all works, but I feel like the docs repo is the place for documenting what is, and this is a proposal to change the language.
Type of issue
Missing information
Description
Seems that the following will not trigger an obsolete warning.
The current docs say:
Which suggests this is a code smell or unidiomatic. More relevant (imo) is that the attribute will be ignored by compiler.
In this case I visited the info page to find out whether it would actually be a problem to ignore the warning. I don't fully understand the reasons why it's ignored, but I feel an explanation here would be helpful.
Thanks!
Page URL
https://learn.microsoft.com/en-us/dotnet/csharp/misc/cs0809
Content source URL
https://github.com/dotnet/docs/blob/main/docs/csharp/misc/cs0809.md
Document Version Independent Id
d83911ea-0426-fc82-622a-3c607d7b787a
Article author
@BillWagner
Metadata