508 references to SpecialType
Microsoft.CodeAnalysis.CSharp (508)
Binder\Binder_Attributes.cs (2)
923if (type.SpecialType == SpecialType.System_Object || 925((ArrayTypeSymbol)type).ElementType.SpecialType == SpecialType.System_Object)
Binder\Binder_Await.cs (1)
394if (isCompletedProperty.Type.SpecialType != SpecialType.System_Boolean)
Binder\Binder_Constraints.cs (1)
563switch (type.SpecialType)
Binder\Binder_Conversions.cs (6)
191Debug.Assert(destination.SpecialType != SpecialType.System_String); 669Parameters: [{ Type.SpecialType: SpecialType.System_String }] 2186destination.SpecialType == SpecialType.System_Object; 3147switch (destination.SpecialType) 3200Debug.Assert(underlyingType.SpecialType != SpecialType.None); 3201destinationType = underlyingType.SpecialType;
Binder\Binder_Expressions.cs (15)
1037if (boundArgument.Type?.SpecialType == SpecialType.System_Void) 1525return ConstantValue.CreateSizeOf((type.GetEnumUnderlyingType() ?? type).SpecialType); 4665if (constantValue == null || constantValue.IsBad || expression.Type.SpecialType != SpecialType.System_Int32) 4688var type = expression.Type.SpecialType; 4805containingType.SpecialType == SpecialType.System_Object || 4808if ((object)initializerType == null || containingType.SpecialType == SpecialType.System_Object) //e.g. when defining System.Object in source 5056if (baseType.SpecialType == SpecialType.System_Object) 5058if (resultMember is null || resultMember.ContainingType.SpecialType != SpecialType.System_Object) 7253var specialType = type.SpecialType; 7257specialType = type.EnumUnderlyingType.SpecialType; 10036original.Parameters[0] is { Type.SpecialType: SpecialType.System_Int32, RefKind: RefKind.None }) 10054else if (receiver.Type.SpecialType == SpecialType.System_String) 10134original.Parameters[0] is { Type.SpecialType: SpecialType.System_Int32, RefKind: RefKind.None } && 10135original.Parameters[1] is { Type.SpecialType: SpecialType.System_Int32, RefKind: RefKind.None }; 10197getMethod.ReturnType.SpecialType == SpecialType.System_Int32 &&
Binder\Binder_InterpolatedString.cs (7)
219Debug.Assert(unconvertedInterpolatedString.Type?.SpecialType == SpecialType.System_String); 245Debug.Assert(unconvertedInterpolatedString.Parts.All(static part => part.Type is null or { SpecialType: SpecialType.System_String })); 304fillin.Value.Type?.SpecialType != SpecialType.System_String || 436=> parts.All(p => p is BoundLiteral or BoundStringInsert { Value.Type.SpecialType: SpecialType.System_String, Alignment: null, Format: null }); 887Debug.Assert(part is BoundLiteral { Type: { SpecialType: SpecialType.System_String }, ConstantValueOpt.IsString: true }); 985bool methodReturnsBool = returnType.SpecialType == SpecialType.System_Boolean; 986if (!methodReturnsBool && returnType.SpecialType != SpecialType.System_Void)
Binder\Binder_Invocation.cs (3)
1366Debug.Assert(parameterType.IsDynamic() || parameterType.SpecialType == SpecialType.System_Object); 1652if (parameterType.IsDynamic() || parameterType.SpecialType == SpecialType.System_Object) 1672if (InAttributeArgument && parameterType.SpecialType == SpecialType.System_Object)
Binder\Binder_Lookup.cs (1)
970var iFaceSpecial = iFaceOriginal.SpecialType;
Binder\Binder_Operators.cs (19)
557Debug.Assert(right.Type.SpecialType == SpecialType.System_String); 883namedType.TypeArgumentsWithAnnotationsNoUseSiteDiagnostics.Single().Type.SpecialType is SpecialType.System_Byte; 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; 1451(operand.Type.SpecialType == SpecialType.System_UInt64 || isNuint(operand.Type))) 1482return type.SpecialType == SpecialType.System_UIntPtr 1735SpecialType operandSpecialType = GetEnumPromotedType(underlyingType.SpecialType); 1736TypeSymbol operandType = (operandSpecialType == underlyingType.SpecialType) ? 1743BinaryOperatorKind newKind = kind.Operator().WithType(newLeftOperand.Type!.SpecialType); 1761Debug.Assert(resultTypeSymbol.SpecialType == SpecialType.System_Boolean); 1770if (resultTypeSymbol.SpecialType != SpecialType.System_Boolean && constantValue != null && !constantValue.IsBad) 1830SpecialType resultType = resultTypeSymbol.SpecialType; 2819var upconvertSpecialType = GetEnumPromotedType(underlyingType.SpecialType); 2820var upconvertType = upconvertSpecialType == underlyingType.SpecialType ? 2868SpecialType resultType = resultTypeSymbol.SpecialType; 3510if (operandType.IsValueType && targetType.IsClassType() && targetType.SpecialType != SpecialType.System_Enum || 3511targetType.IsValueType && operandType.IsClassType() && operandType.SpecialType != SpecialType.System_Enum)
Binder\Binder_Patterns.cs (7)
428if (convertedType.SpecialType == SpecialType.System_String && inputType.IsSpanOrReadOnlySpanChar()) 448bool isExplicitNotNullTest = boundType.Type.SpecialType == SpecialType.System_Object; 562strippedInputType.SpecialType is not SpecialType.System_Object and not SpecialType.System_ValueType) 652if (expression.Type?.SpecialType == SpecialType.System_String && inputType.IsSpanOrReadOnlySpanChar()) 1490if (memberType.SpecialType == SpecialType.System_Int32 && 1619bool isExplicitNotNullTest = patternType.Type.SpecialType == SpecialType.System_Object; 1695internal static BinaryOperatorKind RelationalOperatorType(TypeSymbol type) => type.SpecialType switch
Binder\Binder_Statements.cs (8)
1278if (initializerType.SpecialType == SpecialType.System_String && 1279((object)fixedPatternMethod == null || fixedPatternMethod.ContainingType.SpecialType != SpecialType.System_String)) 2244if (sourceType.SpecialType == SpecialType.System_Double && syntax.Kind() == SyntaxKind.NumericLiteralExpression && 2245(targetType.SpecialType == SpecialType.System_Single || targetType.SpecialType == SpecialType.System_Decimal)) 2247Error(diagnostics, ErrorCode.ERR_LiteralDoubleCast, syntax, (targetType.SpecialType == SpecialType.System_Single) ? "F" : "M", targetType); 3515else if (expression.Type?.SpecialType == SpecialType.System_Void) 3828if (baseType.SpecialType == SpecialType.System_Object)
Binder\DecisionDagBuilder.cs (4)
328RoslynDebug.Assert(getLengthProperty.Type.SpecialType == SpecialType.System_Int32); 464if (input.Type.IsDynamic() ? type.SpecialType == SpecialType.System_Object : conversion.IsImplicit) 1558switch (e1.SpecialType, e2.SpecialType)
Binder\ForEachLoopBinder.cs (12)
258if (!hasErrors && awaitInfo.GetResult?.ReturnType.SpecialType != SpecialType.System_Boolean) 574(collectionConversionClassification.Kind == ConversionKind.ExplicitReference && collectionExpr.Type.SpecialType == SpecialType.System_String)); 682else if (collectionExpr.Type.SpecialType == SpecialType.System_String && builder.CollectionType.SpecialType == SpecialType.System_Collections_IEnumerable) 997if (!isAsync && collectionExprType.SpecialType == SpecialType.System_String) 1099Debug.Assert(collectionType.OriginalDefinition.SpecialType == SpecialType.System_Collections_Generic_IEnumerable_T); 1158Debug.Assert(collectionType.SpecialType == SpecialType.System_Collections_IEnumerable); 1166builder.GetEnumeratorInfo.Method.ReturnType.SpecialType == SpecialType.System_Collections_IEnumerator); 1292builder.ElementTypeWithAnnotations = collectionExprType.SpecialType == SpecialType.System_String ? 1707return moveNextMethodCandidate.OriginalDefinition.ReturnType.SpecialType != SpecialType.System_Boolean; 1723switch (((TypeSymbol)type.OriginalDefinition).SpecialType) 1846return type.SpecialType == SpecialType.System_Collections_Generic_IEnumerable_T;
Binder\InMethodBinder.cs (1)
151switch (originalDefinition.SpecialType)
Binder\PatternExplainer.cs (4)
674if (underlyingType.SpecialType == SpecialType.System_IntPtr) 682else if (underlyingType.SpecialType == SpecialType.System_UIntPtr) 698static bool typeHasExactTypeLiteral(TypeSymbol type) => type.SpecialType switch 719switch (type.SpecialType)
Binder\RefSafetyAnalysis.cs (3)
240return placeholder.Type?.SpecialType == SpecialType.System_Int32; 701Debug.Assert(placeholder.Type.SpecialType == SpecialType.System_Boolean); 902Debug.Assert(node.ArgumentPlaceholders.All(p => p is BoundImplicitIndexerValuePlaceholder { Type.SpecialType: SpecialType.System_Int32 }));
Binder\Semantics\Conversions\ConversionsBase.cs (20)
250var sourceIsVoid = source?.SpecialType == SpecialType.System_Void; 251var destIsVoid = destination.SpecialType == SpecialType.System_Void; 2044if (source.SpecialType == destination.SpecialType) 2101switch (type.SpecialType) 2186switch (otherType.SpecialType) 2206(type.SpecialType == SpecialType.System_IntPtr || type.SpecialType == SpecialType.System_UIntPtr) && !type.IsNativeIntegerType; 2575if (destination.SpecialType == SpecialType.System_Collections_IEnumerable) 2645if (destination.SpecialType == SpecialType.System_Object || destination.Kind == SymbolKind.DynamicType) 2810if (destination.SpecialType == SpecialType.System_MulticastDelegate) 3373return source.IsPointerOrFunctionPointer() && destination is PointerTypeSymbol { PointedAtType: { SpecialType: SpecialType.System_Void } }; 3464if (source.SpecialType == SpecialType.System_Object) 3642if (source.SpecialType == SpecialType.System_Delegate || source.SpecialType == SpecialType.System_MulticastDelegate) 3749if (source.SpecialType == SpecialType.System_Array) 3783var specialDefinition = ((TypeSymbol)source.OriginalDefinition).SpecialType; 3832var specialTypeSource = source.SpecialType; 3853if (source.SpecialType == SpecialType.System_Enum && destination.IsEnumType()) 3924switch (type.SpecialType)
Binder\Semantics\Operators\BinaryOperatorEasyOut.cs (5)
348if (left.Type.SpecialType != right.Type.SpecialType) 354if (left.Type.SpecialType == SpecialType.System_Int32 || 355left.Type.SpecialType == SpecialType.System_Boolean || 356left.Type.SpecialType == SpecialType.System_String)
Binder\Semantics\Operators\BinaryOperatorOverloadResolution.cs (6)
476Debug.Assert(underlying.SpecialType != SpecialType.None); 768((object)left.Type == null || (!left.Type.IsDelegateType() && left.Type.SpecialType != SpecialType.System_String && left.Type.SpecialType != SpecialType.System_Delegate)) && 769((object)right.Type == null || (!right.Type.IsDelegateType() && right.Type.SpecialType != SpecialType.System_String && right.Type.SpecialType != SpecialType.System_Delegate)); 1046return result.SpecialType == SpecialType.System_Boolean ?
Binder\Semantics\Operators\OperatorFacts.cs (1)
32switch (type.SpecialType)
Binder\Semantics\OverloadResolution\OverloadResolution.cs (4)
203members.All(static m => m.ContainingSymbol is NamedTypeSymbol { BaseTypeNoUseSiteDiagnostics.SpecialType: SpecialType.System_Object })); 1629if (type.SpecialType == SpecialType.System_Object && currentType.SpecialType != SpecialType.System_Object) 2773t1.IsDynamic() && t2.SpecialType == SpecialType.System_Object || 2774t2.IsDynamic() && t1.SpecialType == SpecialType.System_Object);
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (1)
1369=> argument is BoundLiteral { Type.SpecialType: SpecialType.System_String } &&
Binder\SwitchBinder.cs (1)
401if (switchGoverningType.SpecialType == SpecialType.System_Boolean)
BoundTree\BoundInlineArrayAccess.cs (1)
19{ SpecialType: SpecialType.System_Int32 } or
CodeGen\EmitArrayInitializer.cs (4)
226return ConstantValue.Default(type.SpecialType); 264if (elementType.SpecialType.IsBlittable()) 497specialElementType = elementType.EnumUnderlyingTypeOrSelf().SpecialType; 686if (elementType.IsReferenceType && elementType.SpecialType != SpecialType.System_String)
CodeGen\EmitConversion.cs (2)
385if (parameters[0].Type.SpecialType != SpecialType.System_Object) continue; 386var p1t = parameters[1].Type.SpecialType;
CodeGen\EmitExpression.cs (17)
53(expression.Type.SpecialType != SpecialType.System_Decimal && 1139Debug.Assert(!field.IsConst || field.ContainingType.SpecialType == SpecialType.System_Decimal, 1333switch (type.SpecialType) 2318return containingType.SpecialType.CanOptimizeBehavior(); 2347Debug.Assert(expression.Type.SpecialType == SpecialType.System_Int32 || 2348expression.Type.SpecialType == SpecialType.System_Int64 || 2349expression.Type.SpecialType == SpecialType.System_UIntPtr); 2603if (rightType.IsReferenceType || (right.ConstantValueOpt != null && rightType.SpecialType != SpecialType.System_Decimal)) 3436if (!type.IsTypeParameter() && type.SpecialType != SpecialType.System_Decimal) 3446if (type.IsPointerOrFunctionPointer() || type.SpecialType == SpecialType.System_UIntPtr) 3452else if (type.SpecialType == SpecialType.System_IntPtr) 3466Debug.Assert(expression.Type.SpecialType == SpecialType.System_Decimal || 3530Debug.Assert(node.Type.SpecialType == SpecialType.System_Int32); 3547Debug.Assert(node.Type.SpecialType == SpecialType.System_Int32); 3561Debug.Assert(node.Type.SpecialType == SpecialType.System_Int32); 3584Debug.Assert(node.Type.SpecialType == SpecialType.System_Int32); 3667Debug.Assert(node.Type.SpecialType == SpecialType.System_Int32);
CodeGen\EmitOperators.cs (16)
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); 375if (comparand is BoundConversion { Type.SpecialType: SpecialType.System_Object, ConversionKind: ConversionKind.Boxing, Operand.Type: TypeParameterSymbol { AllowsRefLikeType: true } } && 496Debug.Assert(condition.Type.SpecialType == SpecialType.System_Boolean); 531Debug.Assert(condition.Type.SpecialType == SpecialType.System_Boolean); 678SpecialType type = enumType.GetEnumUnderlyingType().SpecialType; 786return IsUnsigned(Binder.GetEnumPromotedType(op.Left.Type.GetEnumUnderlyingType().SpecialType)); 789return IsUnsigned(Binder.GetEnumPromotedType(op.Right.Type.GetEnumUnderlyingType().SpecialType));
CodeGen\EmitStackAllocInitializer.cs (3)
45var sizeInBytes = elementType.EnumUnderlyingTypeOrSelf().SpecialType.SizeInBytes(); 138if (IsTypeAllowedInBlobWrapper(elementType.EnumUnderlyingTypeOrSelf().SpecialType)) 185int elementTypeSizeInBytes = elementType.EnumUnderlyingTypeOrSelf().SpecialType.SizeInBytes();
CodeGen\EmitStatement.cs (2)
1308expression.Type.SpecialType == SpecialType.System_String || expression.Type.IsSpanOrReadOnlySpanChar()); 1311if (expression.Type.SpecialType == SpecialType.System_String || expression.Type.IsSpanOrReadOnlySpanChar())
Compilation\BuiltInOperators.cs (1)
693Debug.Assert(((NamedTypeSymbol)readonlySpanOfByte).TypeArgumentsWithAnnotationsNoUseSiteDiagnostics.Single().Type.SpecialType is SpecialType.System_Byte);
Compilation\CSharpCompilation.cs (36)
1715switch (typeArgument.SpecialType) 2167if (method.ReturnType.IsVoidType() || method.ReturnType.SpecialType == SpecialType.System_Int32) 2192(result!.Type!.IsVoidType() || result.Type!.SpecialType == SpecialType.System_Int32); 2211if (returnType.SpecialType != SpecialType.System_Int32 && !returnType.IsVoidType()) 2248return (array.IsSZArray && array.ElementType.SpecialType == SpecialType.System_String, returnsTaskOrTaskOfInt); 4240if (csharpReturnType.SpecialType != SpecialType.None && 4241csharpLeftType.SpecialType != SpecialType.None && 4242csharpRightType.SpecialType != SpecialType.None) 4249if (csharpReturnType.SpecialType == signature.ReturnType.SpecialType && 4250csharpLeftType.SpecialType == signature.LeftType.SpecialType && 4251csharpRightType.SpecialType == signature.RightType.SpecialType) 4263csharpReturnType.SpecialType is SpecialType.System_Boolean) 4265if ((csharpLeftType.SpecialType, csharpRightType.SpecialType) is 4280csharpReturnType.SpecialType == SpecialType.System_Boolean) 4308csharpReturnType.SpecialType is SpecialType.System_Boolean && 4333csharpRightType.SpecialType == csharpLeftType.GetEnumUnderlyingType()?.SpecialType && 4340csharpLeftType.SpecialType == csharpRightType.GetEnumUnderlyingType()?.SpecialType && 4349csharpReturnType.SpecialType == csharpLeftType.GetEnumUnderlyingType()?.SpecialType && 4363csharpReturnType.SpecialType is SpecialType.System_Boolean && 4364csharpLeftType is PointerTypeSymbol { PointedAtType.SpecialType: SpecialType.System_Void } && 4365csharpRightType is PointerTypeSymbol { PointedAtType.SpecialType: SpecialType.System_Void }) 4400csharpReturnType.SpecialType is SpecialType.System_Int64 && 4419=> type.SpecialType is SpecialType.System_Int32 or SpecialType.System_UInt32 or SpecialType.System_Int64 or SpecialType.System_UInt64; 4465if (csharpReturnType.SpecialType != SpecialType.None && csharpOperandType.SpecialType != SpecialType.None) 4472if (csharpReturnType.SpecialType == signature.ReturnType.SpecialType && 4473csharpOperandType.SpecialType == signature.OperandType.SpecialType)
Compilation\CSharpSemanticModel.cs (1)
3861binaryOperator.Type.SpecialType == SpecialType.System_Boolean)
Compiler\AnonymousTypeMethodBodySynthesizer.cs (1)
38Debug.Assert(ContainingType.BaseTypeNoUseSiteDiagnostics.SpecialType == SpecialType.System_Object);
Compiler\ClsComplianceChecker.cs (2)
532System.Diagnostics.Debug.Assert((object)baseType != null || symbol.SpecialType == SpecialType.System_Object, "Only object has no base."); 1017switch (type.SpecialType)
Compiler\MethodBodySynthesizer.cs (1)
37Debug.Assert((object)constructor.ContainingType.BaseTypeNoUseSiteDiagnostics == null || constructor.ContainingType.BaseTypeNoUseSiteDiagnostics.SpecialType == SpecialType.System_Object);
Compiler\MethodBodySynthesizer.Lowered.cs (1)
361Debug.Assert(system_Int32.SpecialType == SpecialType.System_Int32);
Emitter\Model\NamedTypeSymbolAdapter.cs (1)
358else if (method.MethodKind == MethodKind.Destructor && AdaptedNamedTypeSymbol.SpecialType != SpecialType.System_Object)
Emitter\Model\PEModuleBuilder.cs (6)
854return namedType.SpecialType == (SpecialType)platformType; 1084if ((object)declaredBase != null && declaredBase.SpecialType == SpecialType.System_ValueType) 1906Debug.Assert(intType.SpecialType == SpecialType.System_Int32); 1975Debug.Assert(intType.SpecialType == SpecialType.System_Int32); 1992Debug.Assert(intType.SpecialType == SpecialType.System_Int32); 2008Debug.Assert(intType.SpecialType == SpecialType.System_Int32);
Emitter\NoPia\EmbeddedTypesManager.cs (1)
259if (namedType.SpecialType != SpecialType.None || namedType.IsErrorType() || !namedType.ContainingAssembly.IsLinked)
FlowAnalysis\AbstractFlowPass.cs (3)
644else if ((object)node.Type == null || node.Type.SpecialType != SpecialType.System_Boolean) 1458switch (t.SpecialType) 1669&& node.Type.SpecialType == SpecialType.System_Boolean)
FlowAnalysis\DefiniteAssignment.cs (3)
364if (methodThisParameter.Type.SpecialType.CanOptimizeBehavior()) 905type.SpecialType != SpecialType.System_String && 906type is not ArrayTypeSymbol { IsSZArray: true, ElementType.SpecialType: SpecialType.System_Byte })
FlowAnalysis\EmptyStructTypeCache.cs (1)
128return nts.IsStructType() && !nts.SpecialType.CanOptimizeBehavior() && !nts.KnownCircularStruct;
FlowAnalysis\NullableWalker.cs (16)
2896returnType.Type.SpecialType == SpecialType.System_Boolean) 3631&& (type.SpecialType == SpecialType.System_Boolean || type.IsDynamic() || type.IsErrorType()); 4437if (type.SpecialType.CanOptimizeBehavior()) 4506if (property.Type.SpecialType != SpecialType.System_Void) 5178Debug.Assert(binary.Type!.SpecialType == SpecialType.System_Boolean); 6314|| method.ReturnType.SpecialType != SpecialType.System_Boolean 6598if (parameter.ContainingSymbol.GetTypeOrReturnType().Type.SpecialType != SpecialType.System_Boolean) 7158if (method.ReturnType.SpecialType == SpecialType.System_Boolean 8509Debug.Assert(containingType.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T); 10808if ((object)getMethod != null && getMethod.ContainingType.SpecialType == SpecialType.System_Nullable_T) 10918(conversion.Kind == ConversionKind.ExplicitReference && resultType.SpecialType == SpecialType.System_String)) 10926if (collectionExpression.Type!.SpecialType == SpecialType.System_Collections_IEnumerable) 10982else if (resultType.SpecialType == SpecialType.System_String) 11522Debug.Assert(node.Type.SpecialType == SpecialType.System_Boolean); 11525if (typeExpr.Type?.SpecialType == SpecialType.System_Object) 11574Debug.Assert(node.Type.SpecialType == SpecialType.System_RuntimeArgumentHandle);
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (3)
581if (underlying.SpecialType == SpecialType.System_Boolean) 586var possiblePromote = Binder.GetEnumPromotedType(underlying.SpecialType); 588if (possiblePromote == underlying.SpecialType)
Lowering\DiagnosticsPass_ExpressionTrees.cs (1)
93!node.Indices[0].Type!.SpecialType.CanOptimizeBehavior())
Lowering\DiagnosticsPass_Warnings.cs (7)
330if (node.Left.Type.SpecialType == SpecialType.System_Object && !IsExplicitCast(node.Left) && !(node.Left.ConstantValueOpt != null && node.Left.ConstantValueOpt.IsNull) && ConvertedHasEqual(node.OperatorKind, node.Right, out t)) 335else if (node.Right.Type.SpecialType == SpecialType.System_Object && !IsExplicitCast(node.Right) && !(node.Right.ConstantValueOpt != null && node.Right.ConstantValueOpt.IsNull) && ConvertedHasEqual(node.OperatorKind, node.Left, out t)) 447if (!conversion.Operand.Type.SpecialType.IsIntegralType() || !conversion.Type.SpecialType.IsIntegralType()) 452if (!Binder.CheckConstantBounds(conversion.Operand.Type.SpecialType, constantValue, out _)) 630SpecialType fromSpecialType = from.SpecialType; 631SpecialType toSpecialType = to.SpecialType;
Lowering\Extensions.cs (1)
132if (expr.Type.IsNullableType() && expr.Type.GetNullableUnderlyingType().SpecialType != SpecialType.System_Boolean)
Lowering\Instrumentation\LocalStateTracingInstrumenter.cs (4)
213null => variableType.EnumUnderlyingTypeOrSelf().SpecialType switch 462if (parameter.Type.SpecialType == SpecialType.System_String && targetType.SpecialType != SpecialType.System_String) 565if (invocation.Type.SpecialType != SpecialType.System_Void)
Lowering\IteratorRewriter\IteratorRewriter.cs (2)
68switch (method.ReturnType.OriginalDefinition.SpecialType) 81throw ExceptionUtilities.UnexpectedValue(method.ReturnType.OriginalDefinition.SpecialType);
Lowering\LocalRewriter\LocalRewriter.DecisionDagRewriter.cs (6)
175!method.ContainingType.SpecialType.IsPrimitiveRecursiveStruct(); 538if (t1.Input.Type.SpecialType is SpecialType.System_Double or SpecialType.System_Single) 752bool isStringInput = input.Type.SpecialType == SpecialType.System_String; 788switch (input.Type.SpecialType) 813var lessThanOrEqualOperator = input.Type.SpecialType switch 818_ => throw ExceptionUtilities.UnexpectedValue(input.Type.SpecialType)
Lowering\LocalRewriter\LocalRewriter.PatternLocalRewriter.cs (5)
243Debug.Assert(e.Property.GetMethod.Parameters[0].Type.SpecialType == SpecialType.System_Int32); 403if (input.Type.SpecialType == SpecialType.System_Double && double.IsNaN(value.DoubleValue) || 404input.Type.SpecialType == SpecialType.System_Single && float.IsNaN(value.SingleValue)) 412if (operatorKind.OperandTypes() == BinaryOperatorKind.Int && comparisonType.SpecialType != SpecialType.System_Int32) 415Debug.Assert(comparisonType.SpecialType switch
Lowering\LocalRewriter\LocalRewriter_BinaryOperator.cs (11)
117Debug.Assert(node.Type.SpecialType == SpecialType.System_String, "Non-string binary addition should have been handled by VisitConversion or VisitArguments"); 1942Debug.Assert(returnType.SpecialType == SpecialType.System_Boolean); 2032BoundExpression result = method.ReturnType.SpecialType == SpecialType.System_Delegate ? 2040Debug.Assert(loweredLeft.Type is { SpecialType: SpecialType.System_Decimal }); 2041Debug.Assert(loweredRight.Type is { SpecialType: SpecialType.System_Decimal }); 2139Debug.Assert(rightType.SpecialType == SpecialType.System_Int32); 2206Debug.Assert(leftType.SpecialType is SpecialType.System_IntPtr or SpecialType.System_UIntPtr); 2211Debug.Assert(rightType.SpecialType == SpecialType.System_Int32); 2305Debug.Assert(sizeOfExpression.Type is { SpecialType: SpecialType.System_Int32 }); 2316var numericSpecialType = numericOperand.Type.SpecialType; 2454Debug.Assert(returnType.SpecialType == SpecialType.System_Int64);
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (4)
402if (collectionType.OriginalDefinition.SpecialType is 514CodeGenerator.IsTypeAllowedInBlobWrapper(elementType.EnumUnderlyingTypeOrSelf().SpecialType) && 744Debug.Assert(indexTemp.Type is { SpecialType: SpecialType.System_Int32 }); 1081Debug.Assert(indexTemp.Type is { SpecialType: SpecialType.System_Int32 });
Lowering\LocalRewriter\LocalRewriter_CompoundAssignmentOperator.cs (1)
949type.SpecialType.IsClrInteger() ||
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (33)
97Debug.Assert(byteType.SpecialType == SpecialType.System_Byte); 145Debug.Assert(byteArray.ElementType.SpecialType == SpecialType.System_Byte); 228if (type.SpecialType != SpecialType.System_Double && type.SpecialType != SpecialType.System_Single) 434if (rewrittenType.SpecialType == SpecialType.System_Decimal || rewrittenOperand.Type.SpecialType == SpecialType.System_Decimal) 497if (rewrittenType.SpecialType == SpecialType.System_Decimal) 504else if (rewrittenOperand.Type.SpecialType == SpecialType.System_Decimal) 763type.StrippedType().EnumUnderlyingTypeOrSelf().SpecialType; 821rewrittenOperand.Type.SpecialType != SpecialType.System_Decimal && 822rewrittenOperand.Type.SpecialType != SpecialType.System_DateTime) 1106if (!TypeSymbol.Equals(typeFrom, typeTo, TypeCompareKind.ConsiderEverything2) && (typeFrom.SpecialType == SpecialType.System_Decimal || typeTo.SpecialType == SpecialType.System_Decimal)) 1543SpecialType t0Type = t0.IsEnumType() ? t0.GetEnumUnderlyingType()!.SpecialType : t0.SpecialType; 1544SpecialType s0Type = s0.IsEnumType() ? s0.GetEnumUnderlyingType()!.SpecialType : s0.SpecialType; 1653if (typeFrom.SpecialType == SpecialType.System_Decimal) 1656switch (typeTo.SpecialType) 1670throw ExceptionUtilities.UnexpectedValue(typeTo.SpecialType); 1676switch (typeFrom.SpecialType) 1690throw ExceptionUtilities.UnexpectedValue(typeFrom.SpecialType); 1697Debug.Assert(fromType.SpecialType == SpecialType.System_Decimal || toType.SpecialType == SpecialType.System_Decimal); 1699if (fromType.SpecialType == SpecialType.System_Decimal) 1701switch (toType.SpecialType) 1705operand = RewriteDecimalConversionCore(syntax, operand, fromType, get64BitType(_compilation, signed: toType.SpecialType == SpecialType.System_IntPtr), isImplicit, constantValueOpt); 1711switch (fromType.SpecialType) 1715operand = MakeConversionNode(operand, get64BitType(_compilation, signed: fromType.SpecialType == SpecialType.System_IntPtr), @checked); 1803if (fromType.SpecialType == SpecialType.System_Decimal || toType.SpecialType == SpecialType.System_Decimal) 1818if (fromType.SpecialType == SpecialType.System_Decimal) 1831else if (toType.SpecialType == SpecialType.System_Decimal)
Lowering\LocalRewriter\LocalRewriter_FixedStatement.cs (1)
209else if (fixedCollectionInitializer.Expression.Type is { SpecialType: SpecialType.System_String })
Lowering\LocalRewriter\LocalRewriter_ForEachStatement.cs (2)
75if (origDefinition.SpecialType == SpecialType.System_String) 393Debug.Assert(enumeratorType.OriginalDefinition.SpecialType != SpecialType.System_Nullable_T);
Lowering\LocalRewriter\LocalRewriter_IndexerAccess.cs (9)
221if (node.Argument.Type.SpecialType == SpecialType.System_Int32) 341Debug.Assert(index.Type?.SpecialType == SpecialType.System_Int32); 563Debug.Assert(integerArgument.Type!.SpecialType == SpecialType.System_Int32); 659Debug.Assert(loweredExpr.Type!.SpecialType == SpecialType.System_Int32); 670Debug.Assert(loweredExpr.Type!.SpecialType == SpecialType.System_Int32); 718Debug.Assert(hatExpression.Operand is { Type: { SpecialType: SpecialType.System_Int32 } }); 722else if (unloweredExpr is BoundConversion { Operand: { Type: { SpecialType: SpecialType.System_Int32 } } operand }) 731arguments[0] is { Type.SpecialType: SpecialType.System_Int32, ConstantValueOpt.Value: int _ and >= 0 } index && 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 (5)
30Debug.Assert(type is { SpecialType: SpecialType.System_Decimal }); 38Debug.Assert(type is { SpecialType: SpecialType.System_DateTime }); 73curMethod.ContainingType.SpecialType != SpecialType.System_Decimal) && 133Debug.Assert(ctor.ContainingType.SpecialType == SpecialType.System_Decimal); 152Debug.Assert(ctor.ContainingType.SpecialType == SpecialType.System_DateTime);
Lowering\LocalRewriter\LocalRewriter_NullCoalescingOperator.cs (2)
115if (whenNullOpt.IsDefaultValue() && whenNullOpt.Type.SpecialType != SpecialType.System_Decimal) 201if (method.IsStatic && method.ContainingType.SpecialType == SpecialType.System_String)
Lowering\LocalRewriter\LocalRewriter_PointerElementAccess.cs (2)
48switch (rewrittenIndex.Type.SpecialType) 63throw ExceptionUtilities.UnexpectedValue(rewrittenIndex.Type.SpecialType);
Lowering\LocalRewriter\LocalRewriter_StringConcat.cs (8)
173if (method.IsStatic && method.ContainingType.SpecialType == SpecialType.System_String) 243SideEffects: [BoundAssignmentOperator { Right.Type.SpecialType: SpecialType.System_Char } assignment], 434if (arg is BoundCall { ReceiverOpt: { Type: NamedTypeSymbol { SpecialType: SpecialType.System_Char } receiverCharType } receiver } potentialToStringCall && 539if (arg.Type.SpecialType == SpecialType.System_Char) 568Debug.Assert(arg.HasAnyErrors || arg.Type.SpecialType == SpecialType.System_String); 626if (expr is BoundCall { Type.SpecialType: SpecialType.System_String, Method: { Name: "ToString" } method, ReceiverOpt: { Type: NamedTypeSymbol { SpecialType: SpecialType.System_Char } charType, ConstantValueOpt.IsChar: true } } call && 686expr.Type.SpecialType.CanOptimizeBehavior() &&
Lowering\LocalRewriter\LocalRewriter_StringInterpolation.cs (4)
58Debug.Assert(localType.SpecialType == SpecialType.System_Boolean); 75Debug.Assert(call.Type.SpecialType == SpecialType.System_Boolean == usesBoolReturns); 145Debug.Assert(node.Type is { SpecialType: SpecialType.System_String }); // if target-converted, we should not get here. 195Debug.Assert(result.Type.SpecialType == SpecialType.System_String || result.Type.IsErrorType());
Lowering\LocalRewriter\LocalRewriter_TupleBinaryOperator.cs (1)
583Debug.Assert(boolOperator.ReturnType.SpecialType == SpecialType.System_Boolean);
Lowering\LocalRewriter\LocalRewriter_UnaryOperator.cs (11)
84Debug.Assert((kind == UnaryOperatorKind.DynamicTrue || kind == UnaryOperatorKind.DynamicFalse) && type.SpecialType == SpecialType.System_Boolean 134var upconvertSpecialType = Binder.GetEnumPromotedType(underlyingType.SpecialType); 135var upconvertType = upconvertSpecialType == underlyingType.SpecialType ? 743Debug.Assert(binaryOperandType.SpecialType != SpecialType.None); 773Debug.Assert(boundOne.Type is { SpecialType: SpecialType.System_Int32 }); 787if (unaryOperandType.SpecialType == SpecialType.System_Decimal) 791else if (unaryOperandType.IsNullableType() && unaryOperandType.GetNullableUnderlyingType().SpecialType == SpecialType.System_Decimal) 826Debug.Assert(operand.Type is { SpecialType: SpecialType.System_Decimal }); 833Debug.Assert(operand.Type is { } && operand.Type.IsNullableType() && operand.Type.GetNullableUnderlyingType().SpecialType == SpecialType.System_Decimal); 1031switch (underlyingType.SpecialType) 1050throw ExceptionUtilities.UnexpectedValue(underlyingType.SpecialType);
Lowering\SpillSequenceSpiller.cs (1)
1147Debug.Assert(condition.Type.SpecialType == SpecialType.System_Boolean);
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (2)
442if (type.SpecialType == SpecialType.System_TypedReference) return true; 443if (type.SpecialType.CanOptimizeBehavior()) return false; // int, etc
Lowering\SyntheticBoundNodeFactory.cs (9)
650Debug.Assert(left.Type?.SpecialType == CodeAnalysis.SpecialType.System_Boolean); 651Debug.Assert(right.Type?.SpecialType == CodeAnalysis.SpecialType.System_Boolean); 657Debug.Assert(left.Type?.SpecialType == CodeAnalysis.SpecialType.System_Boolean); 658Debug.Assert(right.Type?.SpecialType == CodeAnalysis.SpecialType.System_Boolean); 774case { SpecialType: CodeAnalysis.SpecialType.System_Double }: 777case { SpecialType: CodeAnalysis.SpecialType.System_Single }: 1065Debug.Assert(ex.Type is { SpecialType: CodeAnalysis.SpecialType.System_Int32 }); 1622Debug.Assert(expression is { Type: { SpecialType: CodeAnalysis.SpecialType.System_Boolean } }); 1822Debug.Assert(returnType.SpecialType == CodeAnalysis.SpecialType.System_Boolean);
Symbols\Attributes\AttributeData.cs (2)
561if (property.TypeWithAnnotations.HasType && property.Type.SpecialType == SpecialType.System_String && 655if (member is PropertySymbol { Type: { SpecialType: SpecialType.System_String } })
Symbols\Attributes\SourceAttributeData.cs (3)
283SpecialType specType = parameterType.SpecialType; 310specType = parameterType.GetEnumUnderlyingType()!.SpecialType; 320specType = ((ArrayTypeSymbol)parameterType).ElementType.SpecialType;
Symbols\Compilation_WellKnownMembers.cs (1)
1049switch (type.SpecialType)
Symbols\ConstantValueUtils.cs (1)
112typeSymbol.SpecialType != SpecialType.System_String)
Symbols\ConstraintsHelper.cs (5)
111switch (typeParameter.HasReferenceTypeConstraint ? SpecialType.None : (bounds?.EffectiveBaseClass.SpecialType ?? SpecialType.System_Object)) 322Debug.Assert((effectiveBaseClass.SpecialType == SpecialType.System_Object) || (deducedBaseType.SpecialType != SpecialType.System_Object)); 326if ((constraintTypes.Length == 0) && (deducedBaseType.SpecialType == SpecialType.System_Object)) 328Debug.Assert(effectiveBaseClass.SpecialType == SpecialType.System_Object);
Symbols\DynamicTypeSymbol.cs (1)
210return (object?)other != null && other.SpecialType == Microsoft.CodeAnalysis.SpecialType.System_Object;
Symbols\FieldSymbol.cs (1)
142get { return this.IsConst && (this.Type.SpecialType != SpecialType.System_Decimal); }
Symbols\MemberSignatureComparer.cs (2)
726if (constraintType.SpecialType == SpecialType.System_Object) 739if ((constraintType.SpecialType == SpecialType.System_ValueType) &&
Symbols\Metadata\PE\DynamicTypeDecoder.cs (2)
145PeekFlag() && (type.SpecialType != SpecialType.System_Object && !type.IsDynamic())) 155if (type.SpecialType == SpecialType.System_Object)
Symbols\Metadata\PE\MetadataDecoder.cs (2)
422SpecialType baseSpecialType = (candidate.BaseTypeNoUseSiteDiagnostics?.SpecialType ?? SpecialType.None); 423if (baseSpecialType == SpecialType.None || baseSpecialType != (baseType?.SpecialType ?? SpecialType.None))
Symbols\Metadata\PE\NativeIntegerTypeDecoder.cs (2)
18if (containingType?.SpecialType == SpecialType.System_Runtime_CompilerServices_RuntimeFeature 112switch (type.SpecialType)
Symbols\Metadata\PE\PEFieldSymbol.cs (3)
329_packedFlags.SetIsVolatile(customModifiersArray.Any(static m => !m.IsOptional && ((CSharpCustomModifier)m).ModifierSymbol.SpecialType == SpecialType.System_Runtime_CompilerServices_IsVolatile)); 495if (this.Type.SpecialType == SpecialType.System_Decimal) 602return this.Type.SpecialType == SpecialType.System_Decimal &&
Symbols\Metadata\PE\PEModuleSymbol.cs (1)
494if (keepLookingForDeclaredCorTypes && type.SpecialType != SpecialType.None)
Symbols\Metadata\PE\PENamedTypeSymbol.cs (10)
1228if (type.SpecialType.IsValidEnumUnderlyingType() && 1775SpecialType baseCorTypeId = @base.SpecialType; 1791if (this.SpecialType != SpecialType.System_Enum) 1907if (this.SpecialType == Microsoft.CodeAnalysis.SpecialType.None) 1912switch (this.SpecialType) 1988var isOrdinaryEmbeddableStruct = (this.TypeKind == TypeKind.Struct) && (this.SpecialType == Microsoft.CodeAnalysis.SpecialType.None) && this.ContainingAssembly.IsLinked; 2130else if (TypeKind == TypeKind.Class && SpecialType != SpecialType.System_Enum) 2133if (@base?.SpecialType == SpecialType.None && @base.ContainingAssembly?.IsMissing == true) 2585Debug.Assert(this.SpecialType == SpecialType.System_IntPtr || this.SpecialType == SpecialType.System_UIntPtr);
Symbols\MetadataOrSourceAssemblySymbol.cs (2)
144int index = underlyingType.SpecialType switch 148_ => throw ExceptionUtilities.UnexpectedValue(underlyingType.SpecialType),
Symbols\MethodSymbolExtensions.cs (1)
61else if (method.ContainingType.SpecialType == SpecialType.System_Object)
Symbols\MissingMetadataTypeSymbol.cs (6)
335if (this.SpecialType == Microsoft.CodeAnalysis.SpecialType.System_Object) 347Debug.Assert(this.SpecialType == SpecialType.System_IntPtr || this.SpecialType == SpecialType.System_UIntPtr); 357Debug.Assert(other.SpecialType == this.SpecialType); 377this.SpecialType == Microsoft.CodeAnalysis.SpecialType.System_Object)
Symbols\NamedTypeSymbol.cs (2)
777if (this.SpecialType == SpecialType.System_Object) 799if (this.SpecialType == SpecialType.System_Object)
Symbols\NativeIntegerTypeSymbol.cs (4)
33Debug.Assert(underlyingType.SpecialType == SpecialType.System_IntPtr || underlyingType.SpecialType == SpecialType.System_UIntPtr); 306_specialType = _type.UnderlyingNamedType.SpecialType; 313return previous.SpecialType == _specialType ?
Symbols\PublicModel\TypeSymbol.cs (1)
169SpecialType ITypeSymbol.SpecialType => UnderlyingTypeSymbol.SpecialType;
Symbols\Retargeting\RetargetingSymbolTranslator.cs (1)
212return result.SpecialType == SpecialType.None ? result : result.AsNativeInteger();
Symbols\Source\FieldSymbolWithAttributesAndModifiers.cs (1)
274if (this.Type.SpecialType == SpecialType.System_Decimal)
Symbols\Source\ParameterHelpers.cs (2)
779conversion.IsIdentity && parameterType.SpecialType == SpecialType.System_Object && defaultExpression.Type.IsDynamic()) 794defaultExpression.Type.SpecialType == SpecialType.System_String ||
Symbols\Source\SourceAssemblySymbol.cs (1)
2784switch (type.SpecialType)
Symbols\Source\SourceComplexParameterSymbol.cs (1)
981((NamedTypeSymbol)arg.TypeInternal).EnumUnderlyingType.SpecialType :
Symbols\Source\SourceEnumConstantSymbol.cs (1)
156var constantType = this.ContainingType.EnumUnderlyingType.SpecialType;
Symbols\Source\SourceMemberContainerSymbol.cs (3)
2667if (method.IsOverride && method.GetConstructedLeastOverriddenMethod(this, requireSameReturnType: false).ContainingType.SpecialType == Microsoft.CodeAnalysis.SpecialType.System_Object) 4316if (deconstruct.ReturnType.SpecialType != SpecialType.System_Void && !deconstruct.ReturnType.IsErrorType()) 4743if (thisEquals.ReturnType.SpecialType != SpecialType.System_Boolean && !thisEquals.ReturnType.IsErrorType())
Symbols\Source\SourceMemberFieldSymbol.cs (2)
112&& this.Type.SpecialType == SpecialType.System_Decimal) 136if (IsConst && Type.SpecialType == SpecialType.System_Decimal &&
Symbols\Source\SourceNamedTypeSymbol.cs (5)
1051Debug.Assert(this.SpecialType == SpecialType.System_Object || this.DeclaringCompilation.IsAttributeType(this)); 1588if ((object)baseType != null && baseType.SpecialType != SpecialType.System_Object) 1757Debug.Assert(this.SpecialType == SpecialType.System_IntPtr || this.SpecialType == SpecialType.System_UIntPtr); 1846(type.SpecialType == SpecialType.System_Int32 ||
Symbols\Source\SourceNamedTypeSymbol_Bases.cs (6)
473SpecialType baseSpecialType = baseType.SpecialType; 477if (this.SpecialType == SpecialType.System_Enum && baseSpecialType == SpecialType.System_ValueType || 478this.SpecialType == SpecialType.System_MulticastDelegate && baseSpecialType == SpecialType.System_Delegate) 528if (this.IsStatic && localBase.SpecialType != SpecialType.System_Object) 622if (this.SpecialType == SpecialType.System_Object && ((object)localBase != null || localInterfaces.Count != 0)) 730if (this.SpecialType == SpecialType.System_Object)
Symbols\Source\SourceNamedTypeSymbol_Enum.cs (1)
66if (!type.SpecialType.IsValidEnumUnderlyingType())
Symbols\Source\SourceNamespaceSymbol.cs (1)
442if ((object)type != null && type.SpecialType != SpecialType.None)
Symbols\Source\SourceOrdinaryMethodSymbol.cs (2)
142(this.ContainingType.SpecialType == SpecialType.System_TypedReference || this.ContainingType.SpecialType == SpecialType.System_ArgIterator))
Symbols\Source\SourceUserDefinedOperatorSymbolBase.cs (3)
476if ((ContainingType.SpecialType == SpecialType.System_Nullable_T) 617if (this.ReturnType.SpecialType != SpecialType.System_Boolean) 727else if (this.GetParameterType(1).StrippedType().SpecialType != SpecialType.System_Int32)
Symbols\Symbol.cs (1)
1285modifierType.SpecialType == SpecialType.System_Runtime_CompilerServices_IsVolatile)
Symbols\Synthesized\Records\SynthesizedRecordEqualityOperator.cs (1)
46candidate.ReturnType.SpecialType == SpecialType.System_Boolean && !candidate.IsStatic &&
Symbols\Synthesized\Records\SynthesizedRecordEquals.cs (1)
108baseEquals.ReturnType.SpecialType != SpecialType.System_Boolean)
Symbols\Synthesized\Records\SynthesizedRecordGetHashCode.cs (1)
81if (overridden is null || overridden.ReturnType.SpecialType != SpecialType.System_Int32)
Symbols\Synthesized\Records\SynthesizedRecordObjEquals.cs (1)
47if (_typedRecordEquals.ReturnType.SpecialType != SpecialType.System_Boolean)
Symbols\Synthesized\Records\SynthesizedRecordPrintMembers.cs (1)
158basePrintMethod.ReturnType.SpecialType != SpecialType.System_Boolean)
Symbols\Synthesized\SynthesizedEntryPointSymbol.cs (1)
378ReturnType.SpecialType == SpecialType.System_Int32);
Symbols\Synthesized\SynthesizedThrowSwitchExpressionExceptionMethod.cs (1)
33Debug.Assert(unmatchedValue.Type.SpecialType == SpecialType.System_Object);
Symbols\TypeParameterSymbol.cs (1)
419switch (constraint.SpecialType)
Symbols\TypeSymbol.cs (3)
511_ => SpecialTypes.GetTypeCode(SpecialType) 559|| (SpecialType is SpecialType.System_IntPtr or SpecialType.System_UIntPtr && this.ContainingAssembly.RuntimeSupportsNumericIntPtr); 2497SpecialType ITypeSymbolInternal.SpecialType => this.SpecialType;
Symbols\TypeSymbolExtensions.cs (22)
53return typeSymbol.IsReferenceType || typeSymbol.IsEnumType() || typeSymbol.SpecialType.CanBeConst() || typeSymbol.IsNativeIntegerType; 107return type.SpecialType == SpecialType.System_Void; 141return type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T; 160&& nt.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T) 196return type.SpecialType == SpecialType.System_Object; 201return type.SpecialType == SpecialType.System_String; 206return type.SpecialType == SpecialType.System_Char; 211return type.SpecialType.IsIntegralType(); 229return underlyingType is not null && underlyingType.SpecialType.CanOptimizeBehavior(); 382OriginalDefinition.SpecialType: 525SpecialType st = t.SpecialType; 644switch (type.SpecialType) 661return ConstantValue.Default(type.SpecialType); 670return type is object ? type.SpecialType : SpecialType.None; 1343switch (type.SpecialType) 1436switch (type.SpecialType) 1449switch (type.SpecialType) 1501return type.SpecialType.FixedBufferElementSizeInBytes(); 1510return type.SpecialType.IsValidVolatileFieldType(); 1523return ((NamedTypeSymbol)type).EnumUnderlyingType.SpecialType.IsValidVolatileFieldType(); 1560return t.SpecialType.IsPrimitiveRecursiveStruct(); 1649if (type.SpecialType == SpecialType.System_Object)
Symbols\TypeWithAnnotations.cs (2)
897internal override SpecialType GetSpecialType(TypeSymbol typeSymbol) => typeSymbol.SpecialType; 970internal override SpecialType GetSpecialType(TypeSymbol typeSymbol) => typeSymbol.SpecialType;
Utilities\TypeSymbolExtensions.cs (1)
219if (type.SpecialType == SpecialType.System_Object)
Utilities\ValueSetFactory.cs (1)
61return ForSpecialType(type.SpecialType, type.IsNativeIntegerType);