[Proposal]: Show obsolete errors from overrides
- Dominant language
- C#
- Stars
- 12.7k
- Forks
- 1.1k
- Avg merge
- 11h 1m
- Merged PRs (30d)
- 3
Description
# Show obsolete errors from overrides
* Specification: None yet.
* Discussion: https://github.com/dotnet/csharplang/discussions/8937
## Summary
[summary]: #summary
Today, when an override of a virtual member adds `Obsolete`, we do not warn that the method is obsoleted when the derived type is statically known as the receiver. For example:
```cs
abstract class Base
{
public abstract void M();
}
class Derived : Base
{
[Obsolete]
public override void M() => throw null;
public void M2()
{
M(); // No warning
}
}
```
This is something that we can detect at warn about.
## Design meetings
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.