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

Update PopulateSwitchStatementHelpers.cs

上级 a93b3aee
......@@ -53,7 +53,7 @@ public static ICollection<ISymbol> GetMissingEnumMembers(ISwitchOperation switch
// 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
switchExpression?.Type.IsNullable(out switchExpressionType);
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.
先完成此消息的编辑!
想要评论请 注册