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(
785785 if ( canExecuteSymbol is IMethodSymbol canExecuteMethodSymbol )
786786 {
787787 // 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 } )
789789 {
790790 goto Failure ;
791791 }
@@ -820,7 +820,7 @@ private static bool TryGetCanExecuteExpressionFromSymbol(
820820 else if ( canExecuteSymbol is IPropertySymbol { GetMethod : not null } canExecutePropertySymbol )
821821 {
822822 // 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 } )
824824 {
825825 goto Failure ;
826826 }
@@ -860,8 +860,7 @@ private static bool TryGetCanExecuteMemberFromGeneratedProperty(
860860 foreach ( ISymbol memberSymbol in containingType . GetAllMembers ( ) )
861861 {
862862 // 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 )
865864 {
866865 continue ;
867866 }
You can’t perform that action at this time.
0 commit comments