未验证 提交 b1ef5978 编写于 作者: T Tom Needham 提交者: GitHub

Update PopulateSwitchStatementHelpers.cs

Remove redundant if statement
上级 5fdc04a1
......@@ -48,13 +48,10 @@ public static ICollection<ISymbol> GetMissingEnumMembers(ISwitchOperation switch
var enumMembers = new Dictionary<long, ISymbol>();
if (switchExpressionType?.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T)
{
// Check if the type of the expression is a nullable INamedTypeSymbol
// if the type is both nullable and an INamedTypeSymbol extact the type argument from the nullable
// and check if it is of enum type
switchExpressionType = switchExpressionType.IsNullable(out underlyingType) ? underlyingType : switchExpressionType;
}
// Check if the type of the expression is a nullable INamedTypeSymbol
// if the type is both nullable and an INamedTypeSymbol extract the type argument from the nullable
// and check if it is of enum type
switchExpressionType = switchExpressionType.IsNullable(out underlyingType) ? underlyingType : switchExpressionType;
if (switchExpressionType?.TypeKind == TypeKind.Enum)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册