693 references to System_Boolean
ConfigurationSchemaGenerator (1)
RuntimeSource\Configuration.Binder\ConfigurationBindingGenerator.Parser.cs (1)
263case SpecialType.System_Boolean:
ILLink.RoslynAnalyzer (3)
RequiresAnalyzerBase.cs (1)
332 if (!propertySymbol.IsStatic || propertySymbol.Type.SpecialType != SpecialType.System_Boolean || propertySymbol.SetMethod != null)
TrimAnalysis\FeatureCheckReturnValuePattern.cs (1)
40 if (!OwningSymbol.IsStatic || OwningSymbol.Type.SpecialType != SpecialType.System_Boolean || OwningSymbol.SetMethod != null) {
TrimAnalysis\TrimAnalysisVisitor.cs (1)
440 case SpecialType.System_Boolean when constantValue is bool boolConstantValue:
Microsoft.AspNetCore.App.Analyzers (2)
src\Shared\RoslynUtils\ParsabilityHelper.cs (2)
98methodSymbol.ReturnType.SpecialType == SpecialType.System_Boolean && 108methodSymbol.ReturnType.SpecialType == SpecialType.System_Boolean &&
Microsoft.AspNetCore.Http.RequestDelegateGenerator (2)
src\Shared\RoslynUtils\ParsabilityHelper.cs (2)
98methodSymbol.ReturnType.SpecialType == SpecialType.System_Boolean && 108methodSymbol.ReturnType.SpecialType == SpecialType.System_Boolean &&
Microsoft.CodeAnalysis (141)
Compilation\Expression.cs (1)
31case SpecialType.System_Boolean:
ConstantValue.cs (2)
451case SpecialType.System_Boolean: return ConstantValueTypeDiscriminator.Boolean; 503case ConstantValueTypeDiscriminator.Boolean: return SpecialType.System_Boolean;
MetadataReader\MetadataTypeCodeExtensions.cs (3)
25return SpecialType.System_Boolean; 108case SpecialType.System_Boolean: 145case SpecialType.System_Boolean:
Operations\ControlFlowGraphBuilder.cs (13)
2411INamedTypeSymbol booleanType = _compilation.GetSpecialType(SpecialType.System_Boolean); 2469INamedTypeSymbol booleanType = _compilation.GetSpecialType(SpecialType.System_Boolean); 2570INamedTypeSymbol booleanType = _compilation.GetSpecialType(SpecialType.System_Boolean); 3309return MakeIsNullOperation(operand, _compilation.GetSpecialType(SpecialType.System_Boolean)); 4622return new AwaitOperation(moveNext, semanticModel: null, operation.Syntax, _compilation.GetSpecialType(SpecialType.System_Boolean), isImplicit: true); 4629return MakeInvalidOperation(_compilation.GetSpecialType(SpecialType.System_Boolean), enumeratorRef); 4742ITypeSymbol booleanType = _compilation.GetSpecialType(SpecialType.System_Boolean); 5162_compilation.GetSpecialType(SpecialType.System_Boolean), 5345_compilation.GetSpecialType(SpecialType.System_Boolean), 5466INamedTypeSymbol booleanType = _compilation.GetSpecialType(SpecialType.System_Boolean); 5832ITypeSymbol booleanType = _compilation.GetSpecialType(SpecialType.System_Boolean); 6825Debug.Assert(outParameterArgument is { Parameter: { RefKind: RefKind.Out, Type.SpecialType: SpecialType.System_Boolean } }); 7740INamedTypeSymbol booleanType = _compilation.GetSpecialType(SpecialType.System_Boolean);
SpecialMembers.cs (28)
153(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 162(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 224(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 232(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 258(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 267(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 290(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 367(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 515(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 524(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 533(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 542(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 551(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 560(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 768(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 777(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 786(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 795(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 804(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 813(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 843(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 925(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 933(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 949(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 1076(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 1194(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 1216(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 1233(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type
SpecialTypeExtensions.cs (6)
20case SpecialType.System_Boolean: 45case SpecialType.System_Boolean: 68case SpecialType.System_Boolean: 123case SpecialType.System_Boolean: 144case SpecialType.System_Boolean: 293return SpecialType.System_Boolean;
SpecialTypes.cs (2)
106s_typeIdToTypeCodeMap[(int)SpecialType.System_Boolean] = Microsoft.Cci.PrimitiveTypeCode.Boolean; 130s_typeCodeToTypeIdMap[(int)Microsoft.Cci.PrimitiveTypeCode.Boolean] = SpecialType.System_Boolean;
Symbols\Attributes\CommonAttributeData.cs (2)
580bool allowMultiple = DecodeNamedArgument(namedArgs, "AllowMultiple", SpecialType.System_Boolean, false); 581bool inherited = DecodeNamedArgument(namedArgs, "Inherited", SpecialType.System_Boolean, true);
Symbols\INamedTypeSymbolInternal.cs (1)
46case SpecialType.System_Boolean:
Symbols\ITypeSymbol.cs (1)
221return type?.SpecialType == SpecialType.System_Boolean;
Symbols\TypedConstant.cs (1)
164case SpecialType.System_Boolean:
WellKnownMembers.cs (81)
42(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 50(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 58(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 66(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 74(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 82(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 90(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 307(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 351(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 425(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 433(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 442(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 474(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 481(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 670(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 734(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 935(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 966(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 1102(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 1154(byte)SignatureTypeCode.ByReference, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 1339(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 1346(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 1467(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 1562(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 1843(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 1853(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 1863(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 1873(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 1883(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 1893(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 1900(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 1903(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 1910(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 1913(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 1920(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 1923(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 1930(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 1933(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 1940(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 1943(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 1950(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 1953(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 1963(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 1973(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 1987(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 1988(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 2002(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 2029(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 2030(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 2061(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 2062(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 2123(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 2182(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 2195(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 2224(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 2256(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 2936(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 2940(byte)SignatureTypeCode.ByReference, (byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 2948(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 2952(byte)SignatureTypeCode.ByReference, (byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 3011(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Value 3129(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean,// Value 3281(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 3318(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 3504(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 3595(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 3843(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 3897(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 3971(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 3986(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 4065(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 4096(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 4103(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 4125(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 4196(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 5064(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 5084(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 5104(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 5124(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 5144(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 5164(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean,
Microsoft.CodeAnalysis.CodeStyle (19)
src\Analyzers\Core\Analyzers\PopulateSwitch\AbstractPopulateSwitchDiagnosticAnalyzer.cs (2)
86if (typeWithoutNullable.SpecialType == SpecialType.System_Boolean) 102if (type.RemoveNullableIfPresent() is not { SpecialType: SpecialType.System_Boolean })
src\Analyzers\Core\Analyzers\RemoveRedundantEquality\AbstractRemoveRedundantEqualityDiagnosticAnalyzer.cs (2)
88if (leftType?.SpecialType != SpecialType.System_Boolean || 89rightType?.SpecialType != SpecialType.System_Boolean)
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
898(IsSpecialMethodWithMatchingProperty("ShouldSerialize") && methodSymbol.ReturnType.SpecialType == SpecialType.System_Boolean ||
src\Analyzers\Core\Analyzers\SimplifyBooleanExpression\AbstractSimplifyConditionalDiagnosticAnalyzer.cs (2)
155typeInfo.Type?.SpecialType == SpecialType.System_Boolean && 156typeInfo.ConvertedType?.SpecialType == SpecialType.System_Boolean;
src\Compilers\Core\Portable\SpecialTypeExtensions.cs (6)
20case SpecialType.System_Boolean: 45case SpecialType.System_Boolean: 68case SpecialType.System_Boolean: 123case SpecialType.System_Boolean: 144case SpecialType.System_Boolean: 293return SpecialType.System_Boolean;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (2)
683if (!returnType.GetMembers().OfType<IPropertySymbol>().Any(p => p.Name == WellKnownMemberNames.IsCompleted && p.Type.SpecialType == SpecialType.System_Boolean && p.GetMethod != null)) 733ReturnType.SpecialType: SpecialType.System_Boolean,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.cs (2)
380case SpecialType.System_Boolean: 656case SpecialType.System_Boolean:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\PredefinedTypeExtensions.cs (1)
16PredefinedType.Boolean => SpecialType.System_Boolean,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SpecialTypeExtensions.cs (1)
16SpecialType.System_Boolean => PredefinedType.Boolean,
Microsoft.CodeAnalysis.CodeStyle.Fixes (8)
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.State.cs (1)
387case SpecialType.System_Boolean:
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator_DisposePattern.cs (2)
181compilation.GetSpecialType(SpecialType.System_Boolean), 244var boolType = compilation.GetSpecialType(SpecialType.System_Boolean);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (3)
55returnType: compilation.GetSpecialType(SpecialType.System_Boolean), 416case SpecialType.System_Boolean: 448method.ReturnType.SpecialType == SpecialType.System_Boolean &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (1)
506if (patternValueType == SpecialType.System_Boolean)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.cs (1)
48? [semanticModel.Compilation.GetSpecialType(SpecialType.System_Boolean)]
Microsoft.CodeAnalysis.CSharp (189)
Binder\Binder_Await.cs (1)
394if (isCompletedProperty.Type.SpecialType != SpecialType.System_Boolean)
Binder\Binder_Expressions.cs (4)
2562GetSpecialType(SpecialType.System_Boolean, diagnostics, node); 2650GetSpecialType(SpecialType.System_Boolean, diagnostics, node); 7274case SpecialType.System_Boolean: 9250arguments[1] is { ConstantValueOpt: { SpecialType: SpecialType.System_Boolean, BooleanValue: bool isFromEnd } })
Binder\Binder_InterpolatedString.cs (3)
722var boolType = GetSpecialType(SpecialType.System_Boolean, diagnostics, syntax); 985bool methodReturnsBool = returnType.SpecialType == SpecialType.System_Boolean; 998var expected = builderPatternExpectsBool == true ? Compilation.GetSpecialType(SpecialType.System_Boolean) : Compilation.GetSpecialType(SpecialType.System_Void);
Binder\Binder_Operators.cs (11)
542return new BoundLiteral(node, ConstantValue.Create(kind == BinaryOperatorKind.Equal), GetSpecialType(SpecialType.System_Boolean, diagnostics, node)); 737GetSpecialType(SpecialType.System_Boolean, diagnostics, node)); 936if ((object)left.Type != null && left.Type.SpecialType == SpecialType.System_Boolean && 937(object)right.Type != null && right.Type.SpecialType == SpecialType.System_Boolean) 987bool bothBool = signature.LeftType.SpecialType == SpecialType.System_Boolean && 988signature.RightType.SpecialType == SpecialType.System_Boolean; 1066var booleanType = Compilation.GetSpecialType(SpecialType.System_Boolean); 1305return GetSpecialType(SpecialType.System_Boolean, diagnostics, node); 1766Debug.Assert(resultTypeSymbol.SpecialType == SpecialType.System_Boolean); 1775if (resultTypeSymbol.SpecialType != SpecialType.System_Boolean && constantValue != null && !constantValue.IsBad) 3224var resultType = (TypeSymbol)GetSpecialType(SpecialType.System_Boolean, diagnostics, node);
Binder\Binder_Patterns.cs (2)
41node, expression, pattern, GetSpecialType(SpecialType.System_Boolean, diagnostics, node), 1710SpecialType.System_Boolean => BinaryOperatorKind.Bool,
Binder\Binder_Statements.cs (1)
2640var boolean = GetSpecialType(SpecialType.System_Boolean, diagnostics, node);
Binder\Binder_Symbols.cs (1)
1060this.GetSpecialType(SpecialType.System_Boolean, diagnostics, node);
Binder\Binder_TupleOperators.cs (2)
33TypeSymbol resultType = GetSpecialType(SpecialType.System_Boolean, diagnostics, node); 131TypeSymbol boolean = GetSpecialType(SpecialType.System_Boolean, diagnostics, node);
Binder\ForEachLoopBinder.cs (2)
258if (!hasErrors && awaitInfo.GetResult?.ReturnType.SpecialType != SpecialType.System_Boolean) 1707return moveNextMethodCandidate.OriginalDefinition.ReturnType.SpecialType != SpecialType.System_Boolean;
Binder\PatternExplainer.cs (2)
708SpecialType.System_Boolean => true, 721case SpecialType.System_Boolean:
Binder\RefSafetyAnalysis.cs (1)
726Debug.Assert(placeholder.Type.SpecialType == SpecialType.System_Boolean);
Binder\Semantics\Operators\BinaryOperatorEasyOut.cs (1)
355left.Type.SpecialType == SpecialType.System_Boolean ||
Binder\Semantics\Operators\BinaryOperatorOverloadResolution.cs (5)
312operators.Add(new BinaryOperatorSignature(kind | BinaryOperatorKind.Delegate, delegateType, delegateType, Compilation.GetSpecialType(SpecialType.System_Boolean))); 527var boolean = Compilation.GetSpecialType(SpecialType.System_Boolean); 583operators.Add(new BinaryOperatorSignature(kind | BinaryOperatorKind.Pointer, voidPointerType, voidPointerType, Compilation.GetSpecialType(SpecialType.System_Boolean))); 786operators.Add(new BinaryOperatorSignature(kind | BinaryOperatorKind.Object, @object, @object, Compilation.GetSpecialType(SpecialType.System_Boolean))); 1051return result.SpecialType == SpecialType.System_Boolean ?
Binder\Semantics\Operators\OperatorFacts.cs (1)
35case SpecialType.System_Boolean:
Binder\SwitchBinder.cs (1)
401if (switchGoverningType.SpecialType == SpecialType.System_Boolean)
CodeGen\EmitArrayInitializer.cs (1)
796SpecialType.System_SByte or SpecialType.System_Byte or SpecialType.System_Boolean or
CodeGen\EmitExpression.cs (1)
1346case SpecialType.System_Boolean:
CodeGen\EmitOperators.cs (12)
305Debug.Assert(binOp.Left.Type.SpecialType == SpecialType.System_Boolean); 306Debug.Assert(binOp.Right.Type.SpecialType == SpecialType.System_Boolean); 314Debug.Assert(binOp.Left.Type.SpecialType == SpecialType.System_Boolean); 315Debug.Assert(binOp.Right.Type.SpecialType == SpecialType.System_Boolean); 331Debug.Assert(binOp.Left.Type.SpecialType == SpecialType.System_Boolean); 332Debug.Assert(binOp.Right.Type.SpecialType == SpecialType.System_Boolean); 337Debug.Assert(binOp.Left.Type.SpecialType == SpecialType.System_Boolean); 338Debug.Assert(binOp.Right.Type.SpecialType == SpecialType.System_Boolean); 343Debug.Assert(binOp.Left.Type.SpecialType == SpecialType.System_Boolean); 344Debug.Assert(binOp.Right.Type.SpecialType == SpecialType.System_Boolean); 496Debug.Assert(condition.Type.SpecialType == SpecialType.System_Boolean); 531Debug.Assert(condition.Type.SpecialType == SpecialType.System_Boolean);
Compilation\BuiltInOperators.cs (6)
278case UnaryOperatorKind.Bool: opType = _compilation.GetSpecialType(SpecialType.System_Boolean); break; 733return new BinaryOperatorSignature(kind, left, left, _compilation.GetSpecialType(SpecialType.System_Boolean)); 757case BinaryOperatorKind.Bool: return _compilation.GetSpecialType(SpecialType.System_Boolean); 789case BinaryOperatorKind.Bool: return _compilation.GetSpecialType(SpecialType.System_Boolean); 821case BinaryOperatorKind.Bool: return _compilation.GetSpecialType(SpecialType.System_Boolean); 848BinaryOperatorKind.Bool => _compilation.GetSpecialType(SpecialType.System_Boolean),
Compilation\CSharpCompilation.cs (6)
1734case SpecialType.System_Boolean: 4288csharpReturnType.SpecialType is SpecialType.System_Boolean) 4305csharpReturnType.SpecialType == SpecialType.System_Boolean) 4333csharpReturnType.SpecialType is SpecialType.System_Boolean && 4388csharpReturnType.SpecialType is SpecialType.System_Boolean && 4681internal bool CanEmitBoolean() => CanEmitSpecialType(SpecialType.System_Boolean);
Compilation\CSharpSemanticModel.cs (1)
3861binaryOperator.Type.SpecialType == SpecialType.System_Boolean)
Compiler\MethodBodySynthesizer.cs (1)
352TypeSymbol boolType = compilation.GetSpecialType(SpecialType.System_Boolean);
Compiler\MethodBodySynthesizer.Lowered.cs (3)
85F.Binary(BinaryOperatorKind.ObjectNotEqual, F.SpecialType(SpecialType.System_Boolean), 112F.Binary(BinaryOperatorKind.LessThan, F.SpecialType(SpecialType.System_Boolean), 201F.Binary(BinaryOperatorKind.LessThan, F.SpecialType(SpecialType.System_Boolean),
Emitter\Model\PEAssemblyBuilder.cs (2)
522GetSpecialType(SpecialType.System_Boolean, diagnostics)); 530GetSpecialType(SpecialType.System_Boolean, diagnostics));
Emitter\Model\PEModuleBuilder.cs (1)
1662NamedTypeSymbol booleanType = Compilation.GetSpecialType(SpecialType.System_Boolean);
FlowAnalysis\AbstractFlowPass.cs (3)
644else if ((object)node.Type == null || node.Type.SpecialType != SpecialType.System_Boolean) 1460case SpecialType.System_Boolean: 1669&& node.Type.SpecialType == SpecialType.System_Boolean)
FlowAnalysis\NullableWalker.cs (8)
2957returnType.Type.SpecialType == SpecialType.System_Boolean) 3692&& (type.SpecialType == SpecialType.System_Boolean || type.IsDynamic() || type.IsErrorType()); 5113Debug.Assert(binary.Type.SpecialType == SpecialType.System_Boolean); 5239Debug.Assert(binary.Type!.SpecialType == SpecialType.System_Boolean); 6375|| method.ReturnType.SpecialType != SpecialType.System_Boolean 6659if (parameter.ContainingSymbol.GetTypeOrReturnType().Type.SpecialType != SpecialType.System_Boolean) 7219if (method.ReturnType.SpecialType == SpecialType.System_Boolean 11583Debug.Assert(node.Type.SpecialType == SpecialType.System_Boolean);
Lowering\AsyncRewriter\AsyncMethodToStateMachineRewriter.cs (1)
455resultType: F.SpecialType(SpecialType.System_Boolean)).ToExpression();
Lowering\AsyncRewriter\AsyncRewriter.AsyncIteratorRewriter.cs (4)
126NamedTypeSymbol boolType = F.SpecialType(SpecialType.System_Boolean); 497.Construct(F.SpecialType(SpecialType.System_Boolean)); 522.Construct(F.SpecialType(SpecialType.System_Boolean)); 548.Construct(F.SpecialType(SpecialType.System_Boolean));
Lowering\AsyncRewriter\AsyncStateMachine.cs (1)
49interfaces.Add(compilation.GetWellKnownType(WellKnownType.System_Threading_Tasks_Sources_IValueTaskSource_T).Construct(compilation.GetSpecialType(SpecialType.System_Boolean)));
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (1)
581if (underlying.SpecialType == SpecialType.System_Boolean)
Lowering\Extensions.cs (1)
132if (expr.Type.IsNullableType() && expr.Type.GetNullableUnderlyingType().SpecialType != SpecialType.System_Boolean)
Lowering\Instrumentation\CodeCoverageInstrumenter.cs (2)
116TypeSymbol payloadElementType = methodBodyFactory.SpecialType(SpecialType.System_Boolean); 292_methodBodyFactory.SpecialType(SpecialType.System_Boolean),
Lowering\Instrumentation\LocalStateTracingInstrumenter.cs (1)
215SpecialType.System_Boolean
Lowering\LocalRewriter\LocalRewriter.PatternLocalRewriter.cs (2)
380_factory.SpecialType(SpecialType.System_Boolean), 428return this._localRewriter.MakeBinaryOperator(_factory.Syntax, operatorKind, input, literal, _factory.SpecialType(SpecialType.System_Boolean), method: null, constrainedToTypeOpt: null);
Lowering\LocalRewriter\LocalRewriter_BinaryOperator.cs (10)
646var boolean = _compilation.GetSpecialType(SpecialType.System_Boolean); 812TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 908return MakeLiteral(syntax, ConstantValue.Create(value), _compilation.GetSpecialType(SpecialType.System_Boolean)); 997TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 1224TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 1457TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 1642TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 1834TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 1942Debug.Assert(returnType.SpecialType == SpecialType.System_Boolean); 2083TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean);
Lowering\LocalRewriter\LocalRewriter_FixedStatement.cs (2)
550BoundExpression lengthCheck = factory.Binary(BinaryOperatorKind.IntNotEqual, factory.SpecialType(SpecialType.System_Boolean), lengthCall, factory.Literal(0)); 553BoundExpression condition = factory.Binary(BinaryOperatorKind.LogicalBoolAnd, factory.SpecialType(SpecialType.System_Boolean), notNullCheck, lengthCheck);
Lowering\LocalRewriter\LocalRewriter_ForEachStatement.cs (4)
459type: _compilation.GetSpecialType(SpecialType.System_Boolean)), 613TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 914TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 1064TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean);
Lowering\LocalRewriter\LocalRewriter_Index.cs (1)
17NamedTypeSymbol booleanType = _compilation.GetSpecialType(SpecialType.System_Boolean);
Lowering\LocalRewriter\LocalRewriter_IndexerAccess.cs (1)
732arguments[1] is { Type.SpecialType: SpecialType.System_Boolean, ConstantValueOpt.Value: bool fromEnd })
Lowering\LocalRewriter\LocalRewriter_IsPatternOperator.cs (2)
119Debug.Assert(node.Type is { SpecialType: SpecialType.System_Boolean }); 178Debug.Assert(test.Type.SpecialType == SpecialType.System_Boolean);
Lowering\LocalRewriter\LocalRewriter_Literal.cs (1)
127arguments.Add(new BoundLiteral(syntax, ConstantValue.Create(isNegative), _compilation.GetSpecialType(SpecialType.System_Boolean)));
Lowering\LocalRewriter\LocalRewriter_LockStatement.cs (1)
141TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean);
Lowering\LocalRewriter\LocalRewriter_Range.cs (1)
143TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean);
Lowering\LocalRewriter\LocalRewriter_StringInterpolation.cs (3)
58Debug.Assert(localType.SpecialType == SpecialType.System_Boolean); 75Debug.Assert(call.Type.SpecialType == SpecialType.System_Boolean == usesBoolReturns); 102var boolType = _compilation.GetSpecialType(SpecialType.System_Boolean);
Lowering\LocalRewriter\LocalRewriter_TupleBinaryOperator.cs (1)
583Debug.Assert(boolOperator.ReturnType.SpecialType == SpecialType.System_Boolean);
Lowering\LocalRewriter\LocalRewriter_UnaryOperator.cs (1)
84Debug.Assert((kind == UnaryOperatorKind.DynamicTrue || kind == UnaryOperatorKind.DynamicFalse) && type.SpecialType == SpecialType.System_Boolean
Lowering\LocalRewriter\LoweredDynamicOperationFactory.cs (1)
503var resultType = _factory.SpecialType(SpecialType.System_Boolean);
Lowering\SpillSequenceSpiller.cs (1)
1147Debug.Assert(condition.Type.SpecialType == SpecialType.System_Boolean);
Lowering\StateMachineRewriter\ResumableStateMachineStateAllocator.cs (1)
92f.SpecialType(SpecialType.System_Boolean),
Lowering\SyntheticBoundNodeFactory.cs (17)
645return new BoundIsOperator(this.Syntax, operand, Type(type), c.Kind, SpecialType(Microsoft.CodeAnalysis.SpecialType.System_Boolean)) { WasCompilerGenerated = true }; 650Debug.Assert(left.Type?.SpecialType == CodeAnalysis.SpecialType.System_Boolean); 651Debug.Assert(right.Type?.SpecialType == CodeAnalysis.SpecialType.System_Boolean); 652return Binary(BinaryOperatorKind.LogicalBoolAnd, SpecialType(Microsoft.CodeAnalysis.SpecialType.System_Boolean), left, right); 657Debug.Assert(left.Type?.SpecialType == CodeAnalysis.SpecialType.System_Boolean); 658Debug.Assert(right.Type?.SpecialType == CodeAnalysis.SpecialType.System_Boolean); 659return Binary(BinaryOperatorKind.LogicalBoolOr, SpecialType(Microsoft.CodeAnalysis.SpecialType.System_Boolean), left, right); 664return Binary(BinaryOperatorKind.IntEqual, SpecialType(Microsoft.CodeAnalysis.SpecialType.System_Boolean), left, right); 669return Binary(BinaryOperatorKind.ObjectEqual, SpecialType(Microsoft.CodeAnalysis.SpecialType.System_Boolean), left, right); 680return Binary(BinaryOperatorKind.ObjectNotEqual, SpecialType(Microsoft.CodeAnalysis.SpecialType.System_Boolean), left, right); 685return Binary(BinaryOperatorKind.IntNotEqual, SpecialType(Microsoft.CodeAnalysis.SpecialType.System_Boolean), left, right); 690return Binary(BinaryOperatorKind.IntLessThan, SpecialType(Microsoft.CodeAnalysis.SpecialType.System_Boolean), left, right); 695return Binary(BinaryOperatorKind.IntGreaterThanOrEqual, SpecialType(CodeAnalysis.SpecialType.System_Boolean), left, right); 1127return new BoundLiteral(Syntax, ConstantValue.Create(value), SpecialType(Microsoft.CodeAnalysis.SpecialType.System_Boolean)) { WasCompilerGenerated = true }; 1622Debug.Assert(expression is { Type: { SpecialType: CodeAnalysis.SpecialType.System_Boolean } }); 1755TypeSymbol boolType = Compilation.GetSpecialType(CodeAnalysis.SpecialType.System_Boolean); 1822Debug.Assert(returnType.SpecialType == CodeAnalysis.SpecialType.System_Boolean);
Operations\CSharpOperationFactory.cs (1)
2078TypeWithAnnotations.Create(((CSharpCompilation)_semanticModel.Compilation).GetSpecialType(SpecialType.System_Boolean)),
SymbolDisplay\SymbolDisplayVisitor.Types.cs (1)
669case SpecialType.System_Boolean:
SymbolDisplay\SymbolDisplayVisitor_Constants.cs (1)
51case SpecialType.System_Boolean:
Symbols\AnonymousTypes\AnonymousTypeManager.SymbolCollection.cs (1)
121get { return Compilation.GetSpecialType(SpecialType.System_Boolean); }
Symbols\Attributes\AttributeData.cs (1)
311var sense = arguments.Attribute.CommonConstructorArguments[0].DecodeValue<bool>(SpecialType.System_Boolean);
Symbols\Attributes\SourceAttributeData.cs (1)
326if (specType != SpecialType.System_Boolean)
Symbols\Compilation_WellKnownMembers.cs (2)
786NamedTypeSymbol booleanType = GetSpecialType(SpecialType.System_Boolean); 814var boolType = GetSpecialType(SpecialType.System_Boolean);
Symbols\Metadata\PE\PENamedTypeSymbol.cs (1)
1916case SpecialType.System_Boolean:
Symbols\MethodSymbol.cs (1)
1282new TypedConstant(declaringCompilation.GetSpecialType(SpecialType.System_Boolean), TypedConstantKind.Primitive, true)) // error
Symbols\Source\SourceAssemblySymbol.cs (4)
1830var boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 1988var boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 2546wrapNonExceptionThrows = namedArg.Value.DecodeValue<bool>(SpecialType.System_Boolean); 2786case SpecialType.System_Boolean:
Symbols\Source\SourceComplexParameterSymbol.cs (1)
893return arguments.Length == 1 && arguments[0].TryDecodeValue(SpecialType.System_Boolean, out bool value) ?
Symbols\Source\SourceMemberContainerSymbol.cs (3)
4409returnType: TypeWithAnnotations.Create(compilation.GetSpecialType(SpecialType.System_Boolean)), 4737TypeWithAnnotations.Create(compilation.GetSpecialType(SpecialType.System_Boolean)), 4757if (thisEquals.ReturnType.SpecialType != SpecialType.System_Boolean && !thisEquals.ReturnType.IsErrorType())
Symbols\Source\SourceMethodSymbolWithAttributes.cs (5)
896setLastError = namedArg.Value.DecodeValue<bool>(SpecialType.System_Boolean); 901exactSpelling = namedArg.Value.DecodeValue<bool>(SpecialType.System_Boolean); 905preserveSig = namedArg.Value.DecodeValue<bool>(SpecialType.System_Boolean); 914bestFitMapping = namedArg.Value.DecodeValue<bool>(SpecialType.System_Boolean); 918throwOnUnmappable = namedArg.Value.DecodeValue<bool>(SpecialType.System_Boolean);
Symbols\Source\SourceModuleSymbol.cs (1)
648new TypedConstant(compilation.GetSpecialType(SpecialType.System_Boolean), TypedConstantKind.Primitive, _assemblySymbol.InternalsAreVisible));
Symbols\Source\SourceNamedTypeSymbol.cs (1)
1694new TypedConstant(compilation.GetSpecialType(SpecialType.System_Boolean), TypedConstantKind.Primitive, true)), // error=true
Symbols\Source\SourceUserDefinedOperatorSymbolBase.cs (1)
617if (this.ReturnType.SpecialType != SpecialType.System_Boolean)
Symbols\SpecialTypeExtensions.cs (2)
15case SpecialType.System_Boolean: 47case SpecialType.System_Boolean:
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListEnumeratorTypeSymbol.cs (1)
32_moveNextCalledField = new SynthesizedFieldSymbol(this, compilation.GetSpecialType(SpecialType.System_Boolean), "_moveNextCalled", isReadOnly: false);
Symbols\Synthesized\Records\SynthesizedRecordBaseEquals.cs (1)
29return (ReturnType: TypeWithAnnotations.Create(Binder.GetSpecialType(compilation, SpecialType.System_Boolean, location, diagnostics)),
Symbols\Synthesized\Records\SynthesizedRecordEqualityOperator.cs (1)
46candidate.ReturnType.SpecialType == SpecialType.System_Boolean && !candidate.IsStatic &&
Symbols\Synthesized\Records\SynthesizedRecordEqualityOperatorBase.cs (1)
69return (ReturnType: TypeWithAnnotations.Create(Binder.GetSpecialType(compilation, SpecialType.System_Boolean, location, diagnostics)),
Symbols\Synthesized\Records\SynthesizedRecordEquals.cs (2)
37return (ReturnType: TypeWithAnnotations.Create(Binder.GetSpecialType(compilation, SpecialType.System_Boolean, location, diagnostics)), 108baseEquals.ReturnType.SpecialType != SpecialType.System_Boolean)
Symbols\Synthesized\Records\SynthesizedRecordObjEquals.cs (2)
32return (ReturnType: TypeWithAnnotations.Create(Binder.GetSpecialType(compilation, SpecialType.System_Boolean, location, diagnostics)), 47if (_typedRecordEquals.ReturnType.SpecialType != SpecialType.System_Boolean)
Symbols\Synthesized\Records\SynthesizedRecordPrintMembers.cs (2)
94return (ReturnType: TypeWithAnnotations.Create(Binder.GetSpecialType(compilation, SpecialType.System_Boolean, location, diagnostics)), 158basePrintMethod.ReturnType.SpecialType != SpecialType.System_Boolean)
Symbols\TypeSymbolExtensions.cs (5)
657case SpecialType.System_Boolean: 1357case SpecialType.System_Boolean: 1451case SpecialType.System_Boolean: 2215case SpecialType.System_Boolean: return 2; 2238case SpecialType.System_Boolean: return 17;
Syntax\SyntaxKindExtensions.cs (1)
18return SpecialType.System_Boolean;
Utilities\ValueSetFactory.cs (1)
45SpecialType.System_Boolean => ForBool,
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ITypeSymbolExtensions.cs (1)
19case SpecialType.System_Boolean:
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (11)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (1)
29methodSymbol.ReturnType.SpecialType == SpecialType.System_Boolean &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (10)
978return CreateResult(SpecialType.System_Boolean); 1073return CreateResult(SpecialType.System_Boolean); 1106return CreateResult(SpecialType.System_Boolean); 1171return CreateResult(SpecialType.System_Boolean); 1205return CreateResult(SpecialType.System_Boolean); 1283return CreateResult(SpecialType.System_Boolean); 1292return CreateResult(SpecialType.System_Boolean); 1931return CreateResult(SpecialType.System_Boolean); 2374return [new TypeInferenceInfo(Compilation.GetSpecialType(SpecialType.System_Boolean))]; 2383return CreateResult(SpecialType.System_Boolean);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (5)
CodeGen\CodeGenDeconstructTests.cs (1)
7518Assert.Equal(SpecialType.System_Boolean, zSymbolInfo.Symbol.GetTypeOrReturnType().SpecialType);
CodeGen\CodeGenFunctionPointersTests.cs (3)
229(RefKind.RefReadOnly, IsSpecialType(SpecialType.System_Boolean)), 690(RefKind.RefReadOnly, IsSpecialType(SpecialType.System_Boolean)), 746(RefKind.Ref, IsSpecialType(SpecialType.System_Boolean)),
Emit\EmitMetadataTests.cs (1)
450Assert.Same(module.GetCorLibType(SpecialType.System_Boolean), m2.Parameters.Single().Type);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (5)
Semantics\PatternMatchingTests2.cs (2)
2028Assert.Equal(SpecialType.System_Boolean, typeInfo.Type.SpecialType); 2069Assert.Equal(SpecialType.System_Boolean, typeInfo.Type.SpecialType);
Semantics\PatternSwitchTests.cs (2)
3288Assert.Equal(SpecialType.System_Boolean, type.Type.SpecialType); 3289Assert.Equal(SpecialType.System_Boolean, type.ConvertedType.SpecialType);
Semantics\RecordTests.cs (1)
18553comp.MakeTypeMissing(SpecialType.System_Boolean);
Microsoft.CodeAnalysis.CSharp.Features (4)
Completion\KeywordRecommenders\BoolKeywordRecommender.cs (1)
54protected override SpecialType SpecialType => SpecialType.System_Boolean;
Completion\Providers\DefaultArgumentProvider.cs (1)
39SpecialType.System_Boolean => "false",
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.cs (1)
596Parameters: [{ Type.SpecialType: SpecialType.System_Boolean }],
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (1)
29methodSymbol.ReturnType.SpecialType == SpecialType.System_Boolean &&
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (3)
EditAndContinue\LineEditTests.cs (1)
779SemanticEdit(SemanticEditKind.Update, c => c.GetMember<INamedTypeSymbol>("C").Constructors.Single(c => c.Parameters is [{ Type.SpecialType: SpecialType.System_Boolean }]), preserveLocalVariables: true)
EditAndContinue\TopLevelEditingTests.cs (2)
8717SemanticEdit(SemanticEditKind.Delete, c => c.GetMembers("C.Main").FirstOrDefault(m => m.GetParameterTypes().Any(t => t.SpecialType == SpecialType.System_Boolean))?.ISymbol, deletedSymbolContainerProvider: c => c.GetMember("C")), 8753SemanticEdit(SemanticEditKind.Delete, c => c.GetMembers("C.Main").FirstOrDefault(m => m.GetParameterTypes().Any(t => t.SpecialType == SpecialType.System_Boolean))?.ISymbol, deletedSymbolContainerProvider: c => c.GetMember("C")),
Microsoft.CodeAnalysis.CSharp.Scripting (1)
Hosting\ObjectFormatter\CSharpTypeNameFormatter.cs (1)
31case SpecialType.System_Boolean: return "bool";
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (20)
Semantics\ConditionalOperatorTests.cs (1)
1303Assert.Equal(SpecialType.System_Boolean, model.GetTypeInfo(conditionalExpr.Condition).Type!.SpecialType);
Semantics\InterpolationTests.cs (1)
4429comp.MakeTypeMissing(SpecialType.System_Boolean);
Semantics\LocalFunctionTests.cs (2)
673Assert.Equal(SpecialType.System_Boolean, model.GetTypeInfo(arg.Expression).Type.SpecialType); 727Assert.Equal(SpecialType.System_Boolean, model.GetTypeInfo(arg.Expression).Type.SpecialType);
Semantics\OperatorTests.cs (9)
7061Assert.Equal(comp.GetSpecialType(SpecialType.System_Boolean), info.ConvertedType.GetSymbol()); 7216Assert.Equal(comp.GetSpecialType(SpecialType.System_Boolean).GetPublicSymbol(), info.ConvertedType); 8178compilation.GetSpecialType(SpecialType.System_Boolean)); 8184compilation.GetSpecialType(SpecialType.System_Boolean)); 8189compilation.GetSpecialType(SpecialType.System_Boolean)); 8259signature = new BinaryOperatorSignature(op | BinaryOperatorKind.Enum, leftType, rightType, compilation.GetSpecialType(SpecialType.System_Boolean)); 8284compilation.GetSpecialType(SpecialType.System_Boolean)); 8344leftType.SpecialType == SpecialType.System_Boolean || rightType.SpecialType == SpecialType.System_Boolean ||
Semantics\RawInterpolationTests_Handler.cs (1)
2706comp.MakeTypeMissing(SpecialType.System_Boolean);
Semantics\RecordStructTests.cs (1)
4402comp.MakeTypeMissing(SpecialType.System_Boolean);
Semantics\TargetTypedConditionalOperatorTests.cs (1)
363Assert.Equal(SpecialType.System_Boolean, model.GetTypeInfo(conditionalExpr.Condition).Type!.SpecialType);
Semantics\UnsafeTests.cs (3)
9344Assert.Equal(SpecialType.System_Boolean, summary.Type.SpecialType); 9345Assert.Equal(SpecialType.System_Boolean, summary.ConvertedType.SpecialType); 10592{ SpecialType.System_Boolean, 1 },
Utilities\ValueSetTests.cs (1)
505Assert.Same(ForBool, ForSpecialType(SpecialType.System_Boolean));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (14)
Compilation\CompilationAPITests.cs (3)
2643ImmutableArray.Create<ITypeSymbol>(compilation.GetSpecialType(SpecialType.System_Int32), compilation.GetSpecialType(SpecialType.System_Boolean)), 2760var boolType = compilation.GetSpecialType(SpecialType.System_Boolean).GetPublicSymbol(); 2950var boolType = compilation.GetSpecialType(SpecialType.System_Boolean).GetPublicSymbol();
Compilation\GetSemanticInfoTests.cs (2)
1143Assert.Equal(SpecialType.System_Boolean, info.Type.SpecialType); 5916Assert.Equal(SpecialType.System_Boolean, model.GetTypeInfo(expr).Type.SpecialType);
Compilation\SemanticModelAPITests.cs (3)
4219Assert.Equal(SpecialType.System_Boolean, model.GetTypeInfo(actual[1]).Type.SpecialType); 4433Assert.Equal(SpecialType.System_Boolean, originalTypeInfo.Type.SpecialType); 4436Assert.Equal(SpecialType.System_Boolean, speculativeTypeInfo.Type.SpecialType);
Symbols\AnonymousTypesSymbolTests.cs (1)
1925ImmutableArray.Create<ITypeSymbol>(compilation.GetSpecialType(SpecialType.System_Int32).GetPublicSymbol(), compilation.GetSpecialType(SpecialType.System_Boolean).GetPublicSymbol()),
Symbols\ConversionTests.cs (1)
350Assert.Equal(ConversionKind.Identity, tuple.Item2.ClassifyConversion(tuple.Item1, comp.GetSpecialType(SpecialType.System_Boolean)).Kind);
Symbols\Metadata\PE\MissingTypeReferences.cs (4)
319Assert.Equal(asm1.GetSpecialType(SpecialType.System_Boolean), asm1.GetSpecialType(SpecialType.System_Boolean)); 320Assert.Equal(asm1.GetSpecialType(SpecialType.System_Boolean), asm2.GetSpecialType(SpecialType.System_Boolean));
Microsoft.CodeAnalysis.CSharp.Workspaces (16)
CodeGeneration\CSharpSyntaxGenerator.cs (2)
3240case SpecialType.System_Boolean: 3428SpecialType.System_Boolean => BoolKeyword,
Recommendations\CSharpRecommendationServiceRunner_Operators.cs (1)
96return symbol.Parameters.Length == 2 && symbol.ReturnType.SpecialType == SpecialType.System_Boolean;
Rename\CSharpRenameRewriterLanguageService.cs (1)
1058if (!method.ReturnsVoid && !method.Parameters.Any() && method.ReturnType.SpecialType == SpecialType.System_Boolean)
Simplification\Simplifiers\AbstractCSharpSimplifier.cs (1)
41SpecialType.System_Boolean => SyntaxKind.BoolKeyword,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ITypeSymbolExtensions.cs (1)
19case SpecialType.System_Boolean:
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (10)
978return CreateResult(SpecialType.System_Boolean); 1073return CreateResult(SpecialType.System_Boolean); 1106return CreateResult(SpecialType.System_Boolean); 1171return CreateResult(SpecialType.System_Boolean); 1205return CreateResult(SpecialType.System_Boolean); 1283return CreateResult(SpecialType.System_Boolean); 1292return CreateResult(SpecialType.System_Boolean); 1931return CreateResult(SpecialType.System_Boolean); 2374return [new TypeInferenceInfo(Compilation.GetSpecialType(SpecialType.System_Boolean))]; 2383return CreateResult(SpecialType.System_Boolean);
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (1)
CodeGeneration\SyntaxGeneratorTests.cs (1)
858var returnType = Generator.TypeExpression(SpecialType.System_Boolean);
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (1)
PDB\PdbHelpers.cs (1)
89(SpecialType.System_Boolean, short shortVal) => ConstantValue.Create(shortVal != 0),
Microsoft.CodeAnalysis.Features (15)
GenerateComparisonOperators\GenerateComparisonOperatorsCodeRefactoringProvider.cs (1)
183var boolType = compilation.GetSpecialType(SpecialType.System_Boolean);
GenerateEqualsAndGetHashCodeFromMembers\GenerateEqualsAndGetHashCodeAction.cs (2)
164compilation.GetSpecialType(SpecialType.System_Boolean), 181compilation.GetSpecialType(SpecialType.System_Boolean),
InlineHints\AbstractInlineParameterNameHintsService.cs (1)
247return parameter.Type.SpecialType == SpecialType.System_Boolean;
Snippets\SnippetProviders\AbstractConditionalBlockSnippetProvider.cs (1)
21=> type.SpecialType == SpecialType.System_Boolean;
src\Analyzers\Core\Analyzers\PopulateSwitch\AbstractPopulateSwitchDiagnosticAnalyzer.cs (2)
86if (typeWithoutNullable.SpecialType == SpecialType.System_Boolean) 102if (type.RemoveNullableIfPresent() is not { SpecialType: SpecialType.System_Boolean })
src\Analyzers\Core\Analyzers\RemoveRedundantEquality\AbstractRemoveRedundantEqualityDiagnosticAnalyzer.cs (2)
88if (leftType?.SpecialType != SpecialType.System_Boolean || 89rightType?.SpecialType != SpecialType.System_Boolean)
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
898(IsSpecialMethodWithMatchingProperty("ShouldSerialize") && methodSymbol.ReturnType.SpecialType == SpecialType.System_Boolean ||
src\Analyzers\Core\Analyzers\SimplifyBooleanExpression\AbstractSimplifyConditionalDiagnosticAnalyzer.cs (2)
155typeInfo.Type?.SpecialType == SpecialType.System_Boolean && 156typeInfo.ConvertedType?.SpecialType == SpecialType.System_Boolean;
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.State.cs (1)
387case SpecialType.System_Boolean:
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator_DisposePattern.cs (2)
181compilation.GetSpecialType(SpecialType.System_Boolean), 244var boolType = compilation.GetSpecialType(SpecialType.System_Boolean);
Microsoft.CodeAnalysis.Scripting (2)
Hosting\ObjectFormatter\CommonPrimitiveFormatter.cs (1)
70case SpecialType.System_Boolean:
Hosting\ObjectFormatter\ObjectFormatterHelpers.cs (1)
292return SpecialType.System_Boolean;
Microsoft.CodeAnalysis.UnitTests (1)
CorLibTypesTests.cs (1)
46Assert.Equal(SpecialType.System_Boolean, SpecialTypes.GetTypeFromMetadataName(Cci.PrimitiveTypeCode.Boolean));
Microsoft.CodeAnalysis.VisualBasic (116)
Analysis\FlowAnalysis\AbstractFlowPass.vb (1)
335SpecialType.System_Boolean,
Binding\Binder_Conversions.vb (1)
279Case SyntaxKind.CBoolKeyword : targetType = SpecialType.System_Boolean
Binding\Binder_Expressions.vb (1)
778Dim resultType As TypeSymbol = GetSpecialType(SpecialType.System_Boolean, node, diagnostics)
Binding\Binder_Operators.vb (3)
75Dim booleanType = GetSpecialType(SpecialType.System_Boolean, node, diagnostics) 372Dim booleanType As TypeSymbol = GetSpecialTypeForBinaryOperator(node, leftType, rightType, SpecialType.System_Boolean, 1029defaultRightSpecialType = SpecialType.System_Boolean
Binding\Binder_Query.vb (1)
2331Dim boolSymbol As NamedTypeSymbol = GetSpecialType(SpecialType.System_Boolean, condition, diagnostics)
Binding\Binder_SelectCase.vb (2)
390Dim booleanType = GetSpecialType(SpecialType.System_Boolean, selectExpression.Syntax, diagnostics) 694Case SpecialType.System_Boolean,
Binding\Binder_Statements.vb (3)
3192Dim booleanType = GetSpecialType(SpecialType.System_Boolean, node, diagnostics) 4165DirectCast(boundMoveNextCall, BoundCall).Method.OriginalDefinition.ReturnType.SpecialType <> SpecialType.System_Boolean Then 4952Dim boolSymbol As NamedTypeSymbol = GetSpecialType(SpecialType.System_Boolean, node, diagnostics)
Binding\Binder_Symbols.vb (1)
770type = SpecialType.System_Boolean
Binding\Binder_Utils.vb (1)
1374Case SpecialType.System_Boolean,
Binding\DocumentationCommentCrefBinder_Compat.vb (1)
356type = SpecialType.System_Boolean
Binding\SyntheticBoundTrees\SynthesizedPropertyAccessorBase.vb (2)
266accessor.ContainingAssembly.GetSpecialType(SpecialType.System_Boolean))).MakeCompilerGenerated, 346accessor.ContainingAssembly.GetSpecialType(SpecialType.System_Boolean))).MakeCompilerGenerated,
Binding\SyntheticBoundTrees\SynthesizedStringSwitchHashMethod.vb (2)
98F.Binary(BinaryOperatorKind.IsNot, Me.ContainingAssembly.GetSpecialType(SpecialType.System_Boolean), 119F.Binary(BinaryOperatorKind.LessThan, Me.ContainingAssembly.GetSpecialType(SpecialType.System_Boolean),
CodeGen\EmitOperators.vb (10)
459Debug.Assert(binOp.Left.Type.SpecialType = SpecialType.System_Boolean) 460Debug.Assert(binOp.Right.Type.SpecialType = SpecialType.System_Boolean) 515Debug.Assert(binOp.Left.Type.SpecialType = SpecialType.System_Boolean) 516Debug.Assert(binOp.Right.Type.SpecialType = SpecialType.System_Boolean) 522Debug.Assert(binOp.Left.Type.SpecialType = SpecialType.System_Boolean) 523Debug.Assert(binOp.Right.Type.SpecialType = SpecialType.System_Boolean) 529Debug.Assert(binOp.Left.Type.SpecialType = SpecialType.System_Boolean) 530Debug.Assert(binOp.Right.Type.SpecialType = SpecialType.System_Boolean) 613Debug.Assert(condition.Type.SpecialType = SpecialType.System_Boolean) 643Debug.Assert(condition.Type.SpecialType = SpecialType.System_Boolean)
CodeGen\ResumableStateMachineStateAllocator.vb (1)
87f.SpecialType(SpecialType.System_Boolean),
Compilation\VisualBasicCompilation.vb (1)
3014resolved = SpecialType.System_Boolean
Lowering\AsyncRewriter\AsyncRewriter.AsyncMethodToClassRewriter.Await.vb (1)
78condition:=Me.F.Convert(Me.F.SpecialType(SpecialType.System_Boolean), rewrittenIsCompleted),
Lowering\AsyncRewriter\AsyncRewriter.AsyncMethodToClassRewriter.Spilling.vb (1)
480SpecialType.System_Boolean,
Lowering\ExpressionLambdaRewriter\ExpressionLambdaRewriter_BinaryOperator.vb (2)
279If operandUnderlyingSpecialType = SpecialType.System_Boolean Then 352Dim systemBool As TypeSymbol = _factory.SpecialType(SpecialType.System_Boolean)
Lowering\ExpressionLambdaRewriter\ExpressionLambdaRewriter_Conversion.vb (3)
453Case SpecialType.System_Boolean 554Case SpecialType.System_Boolean : wellKnownHelper = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToDecimalBoolean 581Case SpecialType.System_Boolean : wellKnownHelper = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToStringBoolean
Lowering\Instrumentation\CodeCoverageInstrumenter.vb (2)
119Dim payloadElementType As TypeSymbol = methodBodyFactory.SpecialType(SpecialType.System_Boolean) 285_methodBodyFactory.SpecialType(SpecialType.System_Boolean),
Lowering\IteratorRewriter\IteratorRewriter.vb (1)
104EnsureSpecialType(SpecialType.System_Boolean, bag)
Lowering\LambdaRewriter\LambdaRewriter.vb (1)
450Dim bool = frame.ContainingAssembly.GetSpecialType(SpecialType.System_Boolean)
Lowering\LocalRewriter\LocalRewriter_Conversion.vb (4)
839Case SpecialType.System_Boolean : member = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToBooleanObject 929Case SpecialType.System_Boolean : member = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToStringBoolean 1004Case SpecialType.System_Boolean : member = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToBooleanString 1144Case SpecialType.System_Boolean : member = WellKnownMember.System_Convert__ToBooleanDecimal
Lowering\LocalRewriter\LocalRewriter_ForEach.vb (2)
465Dim booleanType = GetSpecialTypeWithUseSiteDiagnostics(SpecialType.System_Boolean, statementSyntax) 592Debug.Assert(enumeratorInfo.MoveNext.Type.SpecialType = SpecialType.System_Boolean)
Lowering\LocalRewriter\LocalRewriter_ForTo.vb (6)
141type:=GetSpecialType(SpecialType.System_Boolean))) 445Compilation.GetSpecialType(SpecialType.System_Boolean), 449arguments, Compilation.GetSpecialType(SpecialType.System_Boolean), hasErrors:=True) 500Compilation.GetSpecialType(SpecialType.System_Boolean), 504arguments, Compilation.GetSpecialType(SpecialType.System_Boolean), hasErrors:=True) 679Dim booleanType = GetSpecialType(SpecialType.System_Boolean)
Lowering\LocalRewriter\LocalRewriter_LocalDeclaration.vb (1)
174Dim booleanType = GetSpecialTypeWithUseSiteDiagnostics(SpecialType.System_Boolean, syntax)
Lowering\LocalRewriter\LocalRewriter_NullableHelpers.vb (2)
63hasValueExpr = New BoundLiteral(operand.Syntax, ConstantValue.True, Me.GetSpecialType(SpecialType.System_Boolean)) 284Me.Compilation.GetSpecialType(SpecialType.System_Boolean), hasErrors:=True)
Lowering\LocalRewriter\LocalRewriter_RaiseEvent.vb (1)
82Me.Compilation.GetSpecialType(SpecialType.System_Boolean)).MakeCompilerGenerated
Lowering\LocalRewriter\LocalRewriter_UnstructuredExceptionHandling.vb (2)
145Dim bool = nodeFactory.SpecialType(SpecialType.System_Boolean) 408nodeFactory.SpecialType(SpecialType.System_Boolean),
Operations\VisualBasicOperationFactory.vb (1)
1417DirectCast(_semanticModel.Compilation.GetSpecialType(SpecialType.System_Boolean), TypeSymbol),
Preprocessor\CConst.vb (2)
41Case SpecialType.System_Boolean 81Return New CConst(Of Boolean)(value, SpecialType.System_Boolean)
Preprocessor\ExpressionEvaluator.vb (22)
38Const __Boolean = CType(SpecialType.System_Boolean, Byte) 101Case SpecialType.System_Boolean 387Return SpecialType.System_Boolean 487specialType = SpecialType.System_Boolean 611If specialType = SpecialType.System_Boolean Then 621Return ReportSemanticError(ERRID.ERR_TypeMismatch2, expr, SpecialType.System_Char.GetDisplayName(), SpecialType.System_Boolean.GetDisplayName()) 623Return ReportSemanticError(ERRID.ERR_TypeMismatch2, expr, SpecialType.System_DateTime.GetDisplayName(), SpecialType.System_Boolean.GetDisplayName()) 631Return ReportSemanticError(ERRID.ERR_RequiredConstConversion2, expr, SpecialType.System_String.GetDisplayName(), SpecialType.System_Boolean.GetDisplayName()) 633Return ReportSemanticError(ERRID.ERR_TypeMismatch2, expr, specialType, SpecialType.System_Boolean.GetDisplayName()) 659Case SpecialType.System_Boolean 710Case SpecialType.System_Boolean 740Case SpecialType.System_Boolean 778Case SpecialType.System_Boolean 814Case SpecialType.System_Boolean 869Case SpecialType.System_Boolean 898If specialType = SpecialType.System_Boolean Then 908Case SpecialType.System_Boolean 1089ResultType = SpecialType.System_Boolean 1116If resultType = SpecialType.System_Boolean Then 1282If resultType = SpecialType.System_Boolean Then 1411If resultType = SpecialType.System_Boolean Then 1540ElseIf left.SpecialType = SpecialType.System_Boolean Then
Preprocessor\OperatorResolution.vb (2)
32Case SpecialType.System_Boolean 94Const t_bool As Byte = CType(SpecialType.System_Boolean, Byte)
Semantics\Conversions.vb (1)
3340Case SpecialType.System_Byte, SpecialType.System_SByte, SpecialType.System_Boolean
Semantics\Operators.vb (4)
589Case SpecialType.System_Boolean, 620Case SpecialType.System_Boolean 652Case SpecialType.System_Boolean, 1735Const tBoo As SByte = SpecialType.System_Boolean
Symbols\AnonymousTypes\AnonymousType_SymbolCollection.vb (1)
117Return Compilation.GetSpecialType(SpecialType.System_Boolean)
Symbols\Attributes\SourceAttributeData.vb (1)
197foundMatch = specType = SpecialType.System_Boolean
Symbols\Metadata\PE\PEFieldSymbol.vb (1)
246ElseIf selfOrUnderlyingSpecialType = SpecialType.System_Boolean Then
Symbols\Metadata\PE\PENamedTypeSymbol.vb (1)
1142SpecialType.System_Boolean,
Symbols\Source\SourceAssemblySymbol.vb (1)
1566Dim boolType = Me.DeclaringCompilation.GetSpecialType(SpecialType.System_Boolean)
Symbols\Source\SourceMethodSymbol.vb (5)
1701setLastError = namedArg.Value.DecodeValue(Of Boolean)(SpecialType.System_Boolean) 1704exactSpelling = namedArg.Value.DecodeValue(Of Boolean)(SpecialType.System_Boolean) 1707preserveSig = namedArg.Value.DecodeValue(Of Boolean)(SpecialType.System_Boolean) 1713bestFitMapping = namedArg.Value.DecodeValue(Of Boolean)(SpecialType.System_Boolean) 1716throwOnUnmappable = namedArg.Value.DecodeValue(Of Boolean)(SpecialType.System_Boolean)
Symbols\Source\SourceNamedTypeSymbol_ComClass.vb (1)
1008ImmutableArray.Create(New TypedConstant(_comClass.GetSpecialType(SpecialType.System_Boolean),
Symbols\Source\SynthesizedEventAccessorSymbol.vb (1)
281Dim boolType As TypeSymbol = compilation.GetSpecialType(SpecialType.System_Boolean)
Symbols\SpecialTypeExtensions.vb (9)
28Case SpecialType.System_Boolean, 51Case SpecialType.System_Boolean, 98Case SpecialType.System_Boolean, 130SpecialType.System_Boolean, 147Case SpecialType.System_Boolean 188Case SpecialType.System_Boolean 261Case SpecialType.System_Boolean 297Case SpecialType.System_Boolean 361Case SpecialType.System_Boolean
Symbols\TypeSymbolExtensions.vb (2)
326Return this.SpecialType = SpecialType.System_Boolean 430Case SpecialType.System_Boolean
Syntax\VisualBasicSyntaxTree.ConditionalSymbolsMap.vb (1)
179Case SpecialType.System_Boolean
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Utilities\CastAnalyzer.vb (2)
399ElseIf castType.SpecialType = SpecialType.System_Boolean Then 400Return Not (outerType.IsNumericType OrElse outerType.SpecialType = SpecialType.System_Boolean)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (14)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ITypeSymbolExtensions.vb (3)
21Case specialType.System_Boolean 63specialType = specialType.System_Boolean 104Case SpecialType.System_Boolean,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\StringExtensions.vb (1)
97Case SpecialType.System_Boolean,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\TypeSyntaxGeneratorVisitor.vb (1)
98Case SpecialType.System_Boolean
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicTypeInferenceService.TypeInferrer.vb (9)
573Return CreateResult(SpecialType.System_Boolean) 593Return CreateResult(SpecialType.System_Boolean) 597Return CreateResult(SpecialType.System_Boolean) 697Return CreateResult(SpecialType.System_Boolean) 814Return CreateResult(SpecialType.System_Boolean) 822Return CreateResult(SpecialType.System_Boolean) 847Return CreateResult(SpecialType.System_Boolean) 868Return CreateResult(SpecialType.System_Boolean) 872Return CreateResult(SpecialType.System_Boolean)
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (1)
Emit\EmitMetadata.vb (1)
513Assert.Same([Module].GetCorLibType(SpecialType.System_Boolean), m2.Parameters.Single().Type)
Microsoft.CodeAnalysis.VisualBasic.ExpressionCompiler (1)
CompilationContext.vb (1)
521Case SpecialType.System_Boolean
Microsoft.CodeAnalysis.VisualBasic.Features (4)
Completion\KeywordRecommenders\Expressions\TrueFalseKeywordRecommender.vb (1)
37Return types.Any(Function(t) t.SpecialType = SpecialType.System_Boolean)
Completion\KeywordRecommenders\Types\BuiltInTypesKeywordRecommender.vb (1)
86SpecialType.System_Boolean,
Completion\Providers\DefaultArgumentProvider.vb (1)
26Case SpecialType.System_Boolean
ExtractMethod\VisualBasicMethodExtractor.VisualBasicCodeGenerator.vb (1)
374Return method.Parameters(0).Type.SpecialType = SpecialType.System_Boolean
Microsoft.CodeAnalysis.VisualBasic.Scripting (1)
Hosting\ObjectFormatter\VisualBasicTypeNameFormatter.vb (1)
20Case SpecialType.System_Boolean
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (18)
Compilation\CompilationAPITests.vb (3)
1663ImmutableArray.Create(Of ITypeSymbol)(compilation.GetSpecialType(SpecialType.System_Int32), compilation.GetSpecialType(SpecialType.System_Boolean)), 1762Dim boolType = compilation.GetSpecialType(SpecialType.System_Boolean) 1781Dim boolType = compilation.GetSpecialType(SpecialType.System_Boolean)
Compilation\SemanticModelGetDeclaredSymbolAPITests.vb (1)
2808Assert.Equal(compilation.GetSpecialType(System_Boolean), local.Type)
Semantics\BinaryOperators.vb (1)
1184returnName = compilation.GetSpecialType(SpecialType.System_Boolean).ToTestDisplayString()
Semantics\Conversions.vb (5)
232Dim booleanType = c1.GetSpecialType(System_Boolean) 1084Dim booleanType = c1.GetSpecialType(System_Boolean) 2058c1.GetSpecialType(System_Boolean), 2073nullable.Construct(c1.GetSpecialType(System_Boolean)), 2198Private Const s_boolean = System_Boolean
Semantics\GetSemanticInfoTests.vb (8)
6150Assert.Equal(SpecialType.System_Boolean, model.GetTypeInfo(expr).Type.SpecialType) 6155Assert.Equal(SpecialType.System_Boolean, model.GetTypeInfo(expr).Type.SpecialType) 6212Assert.Equal(SpecialType.System_Boolean, model.GetTypeInfo(expr).Type.SpecialType) 6217Assert.Equal(SpecialType.System_Boolean, model.GetTypeInfo(expr).Type.SpecialType) 6252Assert.Equal(SpecialType.System_Boolean, model.GetTypeInfo(expr).Type.SpecialType) 6282Assert.Equal(SpecialType.System_Boolean, model.GetTypeInfo(expr).Type.SpecialType) 6312Assert.Equal(SpecialType.System_Boolean, model.GetTypeInfo(expr).Type.SpecialType) 6350Assert.Equal(SpecialType.System_Boolean, model.GetTypeInfo(expr).Type.SpecialType)
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (10)
SymbolsTests\Metadata\PE\MissingTypeReferences.vb (4)
422Assert.Equal(asm1.GetSpecialType(SpecialType.System_Boolean), asm1.GetSpecialType(SpecialType.System_Boolean)) 423Assert.Equal(asm2.GetSpecialType(SpecialType.System_Boolean), asm1.GetSpecialType(SpecialType.System_Boolean))
SymbolsTests\Source\MethodTests.vb (6)
756Dim constructedM1 = m1.Construct((New TypeSymbol() {compilation.GetSpecialType(SpecialType.System_String), compilation.GetSpecialType(SpecialType.System_Boolean)}).AsImmutableOrNull()) 767Assert.Throws(Of InvalidOperationException)(Sub() constructedM1.Construct((New TypeSymbol() {compilation.GetSpecialType(SpecialType.System_String), compilation.GetSpecialType(SpecialType.System_Boolean)}).AsImmutableOrNull())) 783constructedM1 = m1.Construct((New TypeSymbol() {compilation.GetSpecialType(SpecialType.System_String), compilation.GetSpecialType(SpecialType.System_Boolean)}).AsImmutableOrNull()) 785Assert.Throws(Of InvalidOperationException)(Sub() constructedM1.Construct((New TypeSymbol() {compilation.GetSpecialType(SpecialType.System_String), compilation.GetSpecialType(SpecialType.System_Boolean)}).AsImmutableOrNull())) 786Dim constructedM1_2 = m1.Construct(compilation.GetSpecialType(SpecialType.System_Byte), compilation.GetSpecialType(SpecialType.System_Boolean)) 787Dim constructedM1_3 = m1.Construct((New TypeSymbol() {compilation.GetSpecialType(SpecialType.System_String), compilation.GetSpecialType(SpecialType.System_Boolean)}).AsImmutableOrNull())
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (1)
Syntax\ConstantExpressionEvaluatorTests.vb (1)
21Assert.Equal(ConstantValueTypeDiscriminator.Boolean, SpecialType.System_Boolean.ToConstantValueDiscriminator())
Microsoft.CodeAnalysis.VisualBasic.Workspaces (19)
CodeGeneration\VisualBasicSyntaxGenerator.vb (1)
393Case SpecialType.System_Boolean
Rename\VisualBasicRenameRewriterLanguageService.vb (1)
953If Not method.ReturnsVoid AndAlso Not method.Parameters.Any() AndAlso method.ReturnType.SpecialType = SpecialType.System_Boolean Then
Simplification\Simplifiers\AbstractVisualBasicSimplifier.vb (1)
23Case SpecialType.System_Boolean
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Utilities\CastAnalyzer.vb (2)
399ElseIf castType.SpecialType = SpecialType.System_Boolean Then 400Return Not (outerType.IsNumericType OrElse outerType.SpecialType = SpecialType.System_Boolean)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ITypeSymbolExtensions.vb (3)
21Case specialType.System_Boolean 63specialType = specialType.System_Boolean 104Case SpecialType.System_Boolean,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\StringExtensions.vb (1)
97Case SpecialType.System_Boolean,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\TypeSyntaxGeneratorVisitor.vb (1)
98Case SpecialType.System_Boolean
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicTypeInferenceService.TypeInferrer.vb (9)
573Return CreateResult(SpecialType.System_Boolean) 593Return CreateResult(SpecialType.System_Boolean) 597Return CreateResult(SpecialType.System_Boolean) 697Return CreateResult(SpecialType.System_Boolean) 814Return CreateResult(SpecialType.System_Boolean) 822Return CreateResult(SpecialType.System_Boolean) 847Return CreateResult(SpecialType.System_Boolean) 868Return CreateResult(SpecialType.System_Boolean) 872Return CreateResult(SpecialType.System_Boolean)
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (1)
CodeGeneration\SyntaxGeneratorTests.vb (1)
943Dim returnType = Generator.TypeExpression(SpecialType.System_Boolean)
Microsoft.CodeAnalysis.Workspaces (17)
src\Compilers\Core\Portable\SpecialTypeExtensions.cs (6)
20case SpecialType.System_Boolean: 45case SpecialType.System_Boolean: 68case SpecialType.System_Boolean: 123case SpecialType.System_Boolean: 144case SpecialType.System_Boolean: 293return SpecialType.System_Boolean;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (2)
683if (!returnType.GetMembers().OfType<IPropertySymbol>().Any(p => p.Name == WellKnownMemberNames.IsCompleted && p.Type.SpecialType == SpecialType.System_Boolean && p.GetMethod != null)) 733ReturnType.SpecialType: SpecialType.System_Boolean,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.cs (2)
380case SpecialType.System_Boolean: 656case SpecialType.System_Boolean:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\PredefinedTypeExtensions.cs (1)
16PredefinedType.Boolean => SpecialType.System_Boolean,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SpecialTypeExtensions.cs (1)
16SpecialType.System_Boolean => PredefinedType.Boolean,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (3)
55returnType: compilation.GetSpecialType(SpecialType.System_Boolean), 416case SpecialType.System_Boolean: 448method.ReturnType.SpecialType == SpecialType.System_Boolean &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (1)
506if (patternValueType == SpecialType.System_Boolean)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.cs (1)
48? [semanticModel.Compilation.GetSpecialType(SpecialType.System_Boolean)]
Microsoft.DotNet.CodeAnalysis (1)
Analyzers\AppContextDefaultsAnalyzer.cs (1)
150if (methodSym.Parameters[1].Type.SpecialType != SpecialType.System_Boolean)
Microsoft.Extensions.Options.SourceGeneration (2)
OptionsSourceGenContext.cs (1)
49SpecialType.System_Boolean => true,
Parser.cs (1)
811if (type.SpecialType == SpecialType.System_Boolean)
Microsoft.Interop.ComInterfaceGenerator (2)
src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (2)
244if (parameter.Type.SpecialType == SpecialType.System_Boolean 253if (methodSymbol.ReturnType.SpecialType == SpecialType.System_Boolean
Microsoft.Interop.JavaScript.JSImportGenerator (1)
JSManagedTypeInfo.cs (1)
24case { SpecialType: SpecialType.System_Boolean }:
Microsoft.Interop.LibraryImportGenerator (2)
src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (2)
244if (parameter.Type.SpecialType == SpecialType.System_Boolean 253if (methodSymbol.ReturnType.SpecialType == SpecialType.System_Boolean
Microsoft.Interop.SourceGeneration (9)
BooleanMarshallingInfoProvider.cs (1)
16public bool CanProvideMarshallingInfoForType(ITypeSymbol type) => type.SpecialType == SpecialType.System_Boolean;
ManagedTypeInfo.cs (1)
90public static readonly SpecialTypeInfo Boolean = new("bool", "bool", SpecialType.System_Boolean);
Marshalling\BoolMarshaller.cs (1)
31Debug.Assert(info.ManagedType is SpecialTypeInfo { SpecialType: SpecialType.System_Boolean });
Marshalling\MarshalAsMarshallingGeneratorResolver.cs (6)
60if (underlyingSpecialType == SpecialType.System_Boolean || underlyingSpecialType == SpecialType.System_Char) 75case { ManagedType: SpecialTypeInfo { SpecialType: SpecialType.System_Boolean }, MarshallingAttributeInfo: MarshalAsInfo(UnmanagedType.U1, _) }: 77case { ManagedType: SpecialTypeInfo { SpecialType: SpecialType.System_Boolean }, MarshallingAttributeInfo: MarshalAsInfo(UnmanagedType.I1, _) }: 79case { ManagedType: SpecialTypeInfo { SpecialType: SpecialType.System_Boolean }, MarshallingAttributeInfo: MarshalAsInfo(UnmanagedType.U4, _) }: 81case { ManagedType: SpecialTypeInfo { SpecialType: SpecialType.System_Boolean }, MarshallingAttributeInfo: MarshalAsInfo(UnmanagedType.I4 or UnmanagedType.Bool, _) }: 83case { ManagedType: SpecialTypeInfo { SpecialType: SpecialType.System_Boolean }, MarshallingAttributeInfo: MarshalAsInfo(UnmanagedType.VariantBool, _) }:
Microsoft.VisualStudio.LanguageServices.CSharp (1)
CodeModel\CSharpCodeModelService.cs (1)
723case SpecialType.System_Boolean:
Microsoft.VisualStudio.LanguageServices.VisualBasic (1)
CodeModel\VisualBasicCodeModelService.vb (1)
775Case SpecialType.System_Boolean
System.Text.Json.SourceGeneration (2)
JsonSourceGenerator.Parser.cs (2)
1658if (type.SpecialType is SpecialType.System_Boolean) 1798SpecialType.System_Boolean or
System.Windows.Forms.Analyzers.CSharp (1)
System\Windows\Forms\CSharp\Analyzers\MissingPropertySerializationConfiguration\MissingPropertySerializationConfigurationAnalyzer.cs (1)
68|| shouldSerializeMethod.ReturnType.SpecialType != SpecialType.System_Boolean
System.Windows.Forms.Analyzers.VisualBasic (1)
Analyzers\MissingPropertySerializationConfiguration\MissingPropertySerializationConfigurationDiagnosticAnalyzer.vb (1)
70shouldSerializeMethod.ReturnType.SpecialType <> SpecialType.System_Boolean OrElse