-
Notifications
You must be signed in to change notification settings - Fork 859
Compiler ignores obsolete attribute for enum cases. #6628
Copy link
Copy link
Closed
Labels
Area-Compiler-CheckingType checking, attributes and all aspects of logic checkingType checking, attributes and all aspects of logic checkingBugImpact-Medium(Internal MS Team use only) Describes an issue with moderate impact on existing code.(Internal MS Team use only) Describes an issue with moderate impact on existing code.good first issuehelp wanted
Milestone
Metadata
Metadata
Assignees
Labels
Area-Compiler-CheckingType checking, attributes and all aspects of logic checkingType checking, attributes and all aspects of logic checkingBugImpact-Medium(Internal MS Team use only) Describes an issue with moderate impact on existing code.(Internal MS Team use only) Describes an issue with moderate impact on existing code.good first issuehelp wanted
Type
Fields
Give feedbackNo fields configured for issues without a type.
Projects
Status
Done
When enum case marked with
[<Obsolete>], compiler doesn't give warning.Even with
[<Obsolete("Hello, world!", true)>]it still compiles.Repro steps
Make enum
Tag some case with
[<Obsolete>]attributeTry use it somewhere
Example script:
Expected behavior
When enum case is marked as obsolete, compiler should give warning or error depending on Obsolete attribute configuration
Actual behavior
No compiler warning or error
Related information
OS: Ubuntu 16.04
dotnet fsioutput: