提交 531b6f96 编写于 作者: D Dustin Campbell

Address code review feedback

上级 7e9732f2
...@@ -380,8 +380,12 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Extensions ...@@ -380,8 +380,12 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Extensions
End Function End Function
Private Shared Function CastRemovalChangesDefaultValue(castType As ITypeSymbol, outerType As ITypeSymbol) As Boolean Private Shared Function CastRemovalChangesDefaultValue(castType As ITypeSymbol, outerType As ITypeSymbol) As Boolean
If castType.IsNumericType Then If castType.IsNumericType() Then
Return Not outerType.IsNumericType Return Not outerType.IsNumericType()
ElseIf castType.SpecialType = SpecialType.System_DateTime
Return Not outerType.SpecialType = SpecialType.System_DateTime
ElseIf castType.SpecialType = SpecialType.System_Boolean
Return Not (outerType.IsNumericType OrElse outerType.SpecialType = SpecialType.System_Boolean)
End If End If
If castType.OriginalDefinition?.SpecialType = SpecialType.System_Nullable_T Then If castType.OriginalDefinition?.SpecialType = SpecialType.System_Nullable_T Then
...@@ -403,14 +407,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Extensions ...@@ -403,14 +407,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Extensions
Return True Return True
End If End If
Select Case castType.SpecialType Return False
Case SpecialType.System_DateTime
Return Not outerType.SpecialType = SpecialType.System_DateTime
Case SpecialType.System_Boolean
Return Not (outerType.IsNumericType OrElse outerType.SpecialType = SpecialType.System_Boolean)
Case Else
Return False
End Select
End Function End Function
Public Shared Function IsUnnecessary( Public Shared Function IsUnnecessary(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册