File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -785,7 +785,7 @@ private static bool TryGetCanExecuteExpressionFromSymbol(
785
785
if ( canExecuteSymbol is IMethodSymbol canExecuteMethodSymbol )
786
786
{
787
787
// The return type must always be a bool
788
- if ( ! canExecuteMethodSymbol . ReturnType . HasFullyQualifiedMetadataName ( "System.Boolean" ) )
788
+ if ( canExecuteMethodSymbol . ReturnType is not { SpecialType : SpecialType . System_Boolean } )
789
789
{
790
790
goto Failure ;
791
791
}
@@ -820,7 +820,7 @@ private static bool TryGetCanExecuteExpressionFromSymbol(
820
820
else if ( canExecuteSymbol is IPropertySymbol { GetMethod : not null } canExecutePropertySymbol )
821
821
{
822
822
// The property type must always be a bool
823
- if ( ! canExecutePropertySymbol . Type . HasFullyQualifiedMetadataName ( "System.Boolean" ) )
823
+ if ( canExecutePropertySymbol . Type is not { SpecialType : SpecialType . System_Boolean } )
824
824
{
825
825
goto Failure ;
826
826
}
@@ -860,8 +860,7 @@ private static bool TryGetCanExecuteMemberFromGeneratedProperty(
860
860
foreach ( ISymbol memberSymbol in containingType . GetAllMembers ( ) )
861
861
{
862
862
// Only look for instance fields of bool type
863
- if ( memberSymbol is not IFieldSymbol { IsStatic : false } fieldSymbol ||
864
- ! fieldSymbol . Type . HasFullyQualifiedMetadataName ( "System.Boolean" ) )
863
+ if ( memberSymbol is not IFieldSymbol { IsStatic : false , Type . SpecialType : SpecialType . System_Boolean } fieldSymbol )
865
864
{
866
865
continue ;
867
866
}
You can’t perform that action at this time.
0 commit comments