-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Labels
4 - In ReviewA fix for the issue is submitted for review.A fix for the issue is submitted for review.Area-CompilersBugFeature - Warning WavesWarning WavesWarning WavesFeature RequestLanguage-C#
Milestone
Description
Roslyn permits a type test of a static type, failing to diagnose the following:
static class Fiz
{
}
bool M(object o)
{
return o is Fiz; // error: cannot use a static type in 'is' or 'as'
}This is correctly diagnosed as an error in "strict" mode.
Please diagnose this in a warning wave.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
4 - In ReviewA fix for the issue is submitted for review.A fix for the issue is submitted for review.Area-CompilersBugFeature - Warning WavesWarning WavesWarning WavesFeature RequestLanguage-C#