Obsolete warning isn't produced for some obsolete symbol usages
See original GitHub issue[Obsolete("Class is obsolete")]
public class ObsoleteClass
{
}
let c1: ObsoleteClass = null
let c2 = ObsoleteClass()
Two warnings are expected, but only one is produced:
C# compiler produces two warnings:
ObsoleteClass c = new ObsoleteClass();
Issue Analytics
- State:
- Created a year ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
c# - Selectively suppress custom Obsolete warnings
I'm using the Obsolete attribute (as just suggested by fellow programmers) to show a warning if a certain method is used. Is there...
Read more >Obsolete features in .NET 5+
Diagnostic ID Warning or error Description
SYSLIB0005 Warning The global assembly cache (GAC) is not supported.
SYSLIB0025 Warning SuppressIldasmAttribute has no effect in .NET 6+....
Read more >Warning control — Python 3.11.4 documentation
For example, one might want to issue a warning when a program uses an obsolete module. Python programmers issue warnings by calling the...
Read more >Obsolete (Warning as Errors) No Errors shown
I made a new minimal ReproWhen a Obselete Attribute has a newline in it, the Csharp compiler crashes when trying to display this...
Read more >Deprecated and obsolete features - JavaScript - MDN Web Docs
This page lists features of JavaScript that are deprecated (that is, still available but planned for removal) and obsolete (that is, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@auduchinok I believe I have covered all the cases in this issue including events 😀See https://github.com/dotnet/fsharp/blob/main/tests/FSharp.Compiler.ComponentTests/Language/ObsoleteAttributeCheckingTests.fs
@vzarytovskii @auduchinok
I think is in main
My changes where June 13 https://github.com/dotnet/fsharp/pull/13257 (See the testing scenarios to see this is fixed) And it did address some of the inconsistencies . But there are still some pending like https://github.com/dotnet/fsharp/issues/6628 and https://github.com/dotnet/fsharp/issues/11529
Try adding new before the class name ?
I think we can add more testing to validate this behaviours and see what is still missing ?