Version Used:
Latest master
Steps to Reproduce:
- Create a C# project with following code and
<LangVersion>preview</LangVersion>:
using System;
namespace ConvertToSwitchExpression
{
public class A
{
public string M1(int i)
{
switch (i)
{
case 0:
return "Zero";
case 1:
return "One";
default:
return "Multiple";
}
}
}
}
- Verify code fix to convert switch statement to switch expression is shown, and IDE0066 is a hidden diagnostic
- Change severity of
CSharpCodeStyleOptions.PreferSwitchExpression to Warning

Expected Behavior:
See a warning in error list and a squiggle in the editor on switch keyword.
Actual Behavior:
IDE0066 is always reported as a hidden diagnostic
Version Used:
Latest master
Steps to Reproduce:
<LangVersion>preview</LangVersion>:CSharpCodeStyleOptions.PreferSwitchExpressionto WarningExpected Behavior:
See a warning in error list and a squiggle in the editor on switch keyword.
Actual Behavior:
IDE0066 is always reported as a hidden diagnostic