754 references to SpecialType
Microsoft.CodeAnalysis.CSharp (523)
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)
564switch (type.SpecialType)
Binder\Binder_Conversions.cs (6)
191Debug.Assert(destination.SpecialType != SpecialType.System_String); 669Parameters: [{ Type.SpecialType: SpecialType.System_String }] 2203destination.SpecialType == SpecialType.System_Object; 3170switch (destination.SpecialType) 3223Debug.Assert(underlyingType.SpecialType != SpecialType.None); 3224destinationType = underlyingType.SpecialType;
Binder\Binder_Expressions.cs (15)
1044if (boundArgument.Type?.SpecialType == SpecialType.System_Void) 1565return ConstantValue.CreateSizeOf((type.GetEnumUnderlyingType() ?? type).SpecialType); 4730if (constantValue == null || constantValue.IsBad || expression.Type.SpecialType != SpecialType.System_Int32) 4753var type = expression.Type.SpecialType; 4870containingType.SpecialType == SpecialType.System_Object || 4873if ((object)initializerType == null || containingType.SpecialType == SpecialType.System_Object) //e.g. when defining System.Object in source 5121if (baseType.SpecialType == SpecialType.System_Object) 5123if (resultMember is null || resultMember.ContainingType.SpecialType != SpecialType.System_Object) 7316var specialType = type.SpecialType; 7320specialType = type.EnumUnderlyingType.SpecialType; 10434original.Parameters[0] is { Type.SpecialType: SpecialType.System_Int32, RefKind: RefKind.None }) 10452else if (receiver.Type.SpecialType == SpecialType.System_String) 10534original.Parameters[0] is { Type.SpecialType: SpecialType.System_Int32, RefKind: RefKind.None } && 10535original.Parameters[1] is { Type.SpecialType: SpecialType.System_Int32, RefKind: RefKind.None }; 10597getMethod.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)
1424Debug.Assert(parameterType.IsDynamic() || parameterType.SpecialType == SpecialType.System_Object); 1710if (parameterType.IsDynamic() || parameterType.SpecialType == SpecialType.System_Object) 1730if (InAttributeArgument && parameterType.SpecialType == SpecialType.System_Object)
Binder\Binder_Lookup.cs (2)
1058var iFaceSpecial = iFaceOriginal.SpecialType; 1342hiddenContainer.SpecialType != SpecialType.System_Object)
Binder\Binder_Operators.cs (21)
378if (leftType.SpecialType.IsNumericType()) 956Debug.Assert(right.Type.SpecialType == SpecialType.System_String); 1336namedType.TypeArgumentsWithAnnotationsNoUseSiteDiagnostics.Single().Type.SpecialType is SpecialType.System_Byte; 1389if ((object)left.Type != null && left.Type.SpecialType == SpecialType.System_Boolean && 1390(object)right.Type != null && right.Type.SpecialType == SpecialType.System_Boolean) 1457bool bothBool = signature.LeftType.SpecialType == SpecialType.System_Boolean && 1458signature.RightType.SpecialType == SpecialType.System_Boolean; 2252(operand.Type.SpecialType == SpecialType.System_UInt64 || isNuint(operand.Type))) 2282return type.SpecialType == SpecialType.System_UIntPtr 2583SpecialType operandSpecialType = GetEnumPromotedType(underlyingType.SpecialType); 2584TypeSymbol operandType = (operandSpecialType == underlyingType.SpecialType) ? 2591BinaryOperatorKind newKind = kind.Operator().WithType(newLeftOperand.Type!.SpecialType); 2609Debug.Assert(resultTypeSymbol.SpecialType == SpecialType.System_Boolean); 2618if (resultTypeSymbol.SpecialType != SpecialType.System_Boolean && constantValue != null && !constantValue.IsBad) 2678SpecialType resultType = resultTypeSymbol.SpecialType; 3303operandType.SpecialType.IsNumericType() || 4246var upconvertSpecialType = GetEnumPromotedType(underlyingType.SpecialType); 4247var upconvertType = upconvertSpecialType == underlyingType.SpecialType ? 4295SpecialType resultType = resultTypeSymbol.SpecialType; 4937if (operandType.IsValueType && targetType.IsClassType() && targetType.SpecialType != SpecialType.System_Enum || 4938targetType.IsValueType && operandType.IsClassType() && operandType.SpecialType != SpecialType.System_Enum)
Binder\Binder_Patterns.cs (7)
429if (convertedType.SpecialType == SpecialType.System_String && inputType.IsSpanOrReadOnlySpanChar()) 449bool isExplicitNotNullTest = boundType.Type.SpecialType == SpecialType.System_Object; 563strippedInputType.SpecialType is not SpecialType.System_Object and not SpecialType.System_ValueType) 653if (expression.Type?.SpecialType == SpecialType.System_String && inputType.IsSpanOrReadOnlySpanChar()) 1491if (memberType.SpecialType == SpecialType.System_Int32 && 1620bool isExplicitNotNullTest = patternType.Type.SpecialType == SpecialType.System_Object; 1696internal 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)) 2260if (sourceType.SpecialType == SpecialType.System_Double && syntax.Kind() == SyntaxKind.NumericLiteralExpression && 2261(targetType.SpecialType == SpecialType.System_Single || targetType.SpecialType == SpecialType.System_Decimal)) 2263Error(diagnostics, ErrorCode.ERR_LiteralDoubleCast, syntax, (targetType.SpecialType == SpecialType.System_Single) ? "F" : "M", targetType); 3531else if (expression.Type?.SpecialType == SpecialType.System_Void) 3844if (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)
266if (!hasErrors && awaitInfo.GetResult?.ReturnType.SpecialType != SpecialType.System_Boolean) 589(collectionConversionClassification.Kind == ConversionKind.ExplicitReference && collectionExpr.Type.SpecialType == SpecialType.System_String)); 697else if (collectionExpr.Type.SpecialType == SpecialType.System_String && builder.CollectionType.SpecialType == SpecialType.System_Collections_IEnumerable) 1012if (!isAsync && collectionExprType.SpecialType == SpecialType.System_String) 1128Debug.Assert(collectionType.OriginalDefinition.SpecialType == SpecialType.System_Collections_Generic_IEnumerable_T); 1187Debug.Assert(collectionType.SpecialType == SpecialType.System_Collections_IEnumerable); 1195builder.GetEnumeratorInfo.Method.ReturnType.SpecialType == SpecialType.System_Collections_IEnumerator); 1321builder.ElementTypeWithAnnotations = collectionExprType.SpecialType == SpecialType.System_String ? 1758return moveNextMethodCandidate.OriginalDefinition.ReturnType.SpecialType != SpecialType.System_Boolean; 1774switch (((TypeSymbol)type.OriginalDefinition).SpecialType) 1897return type.SpecialType == SpecialType.System_Collections_Generic_IEnumerable_T;
Binder\InMethodBinder.cs (1)
152switch (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; 766Debug.Assert(placeholder.Type.SpecialType == SpecialType.System_Boolean); 967Debug.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; 2042if (source.SpecialType == destination.SpecialType) 2099switch (type.SpecialType) 2184switch (otherType.SpecialType) 2204(type.SpecialType == SpecialType.System_IntPtr || type.SpecialType == SpecialType.System_UIntPtr) && !type.IsNativeIntegerType; 2573if (destination.SpecialType == SpecialType.System_Collections_IEnumerable) 2643if (destination.SpecialType == SpecialType.System_Object || destination.Kind == SymbolKind.DynamicType) 2808if (destination.SpecialType == SpecialType.System_MulticastDelegate) 3371return source.IsPointerOrFunctionPointer() && destination is PointerTypeSymbol { PointedAtType: { SpecialType: SpecialType.System_Void } }; 3462if (source.SpecialType == SpecialType.System_Object) 3640if (source.SpecialType == SpecialType.System_Delegate || source.SpecialType == SpecialType.System_MulticastDelegate) 3747if (source.SpecialType == SpecialType.System_Array) 3781var specialDefinition = ((TypeSymbol)source.OriginalDefinition).SpecialType; 3830var specialTypeSource = source.SpecialType; 3851if (source.SpecialType == SpecialType.System_Enum && destination.IsEnumType()) 3922switch (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)
489Debug.Assert(underlying.SpecialType != SpecialType.None); 781((object)left.Type == null || (!left.Type.IsDelegateType() && left.Type.SpecialType != SpecialType.System_String && left.Type.SpecialType != SpecialType.System_Delegate)) && 782((object)right.Type == null || (!right.Type.IsDelegateType() && right.Type.SpecialType != SpecialType.System_String && right.Type.SpecialType != SpecialType.System_Delegate)); 1082return result.SpecialType == SpecialType.System_Boolean ?
Binder\Semantics\Operators\OperatorFacts.cs (1)
32switch (type.SpecialType)
Binder\Semantics\OverloadResolution\OverloadResolution.cs (5)
204members.All(static m => m.ContainingSymbol is NamedTypeSymbol { BaseTypeNoUseSiteDiagnostics.SpecialType: SpecialType.System_Object })); 1644if (type.SpecialType == SpecialType.System_Object && currentType.SpecialType != SpecialType.System_Object) 2816t1.IsDynamic() && t2.SpecialType == SpecialType.System_Object || 2817t2.IsDynamic() && t1.SpecialType == SpecialType.System_Object);
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (1)
1371=> 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); 263if (elementType.SpecialType.IsBlittable()) 495specialElementType = elementType.EnumUnderlyingTypeOrSelf().SpecialType; 684if (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) 2334return containingType.SpecialType.CanOptimizeBehavior(); 2363Debug.Assert(expression.Type.SpecialType == SpecialType.System_Int32 || 2364expression.Type.SpecialType == SpecialType.System_Int64 || 2365expression.Type.SpecialType == SpecialType.System_UIntPtr); 2624if (rightType.IsReferenceType || (right.ConstantValueOpt != null && rightType.SpecialType != SpecialType.System_Decimal)) 3464if (!type.IsTypeParameter() && type.SpecialType != SpecialType.System_Decimal) 3474if (type.IsPointerOrFunctionPointer() || type.SpecialType == SpecialType.System_UIntPtr) 3480else if (type.SpecialType == SpecialType.System_IntPtr) 3494Debug.Assert(expression.Type.SpecialType == SpecialType.System_Decimal || 3561Debug.Assert(node.Type.SpecialType == SpecialType.System_Int32); 3578Debug.Assert(node.Type.SpecialType == SpecialType.System_Int32); 3592Debug.Assert(node.Type.SpecialType == SpecialType.System_Int32); 3615Debug.Assert(node.Type.SpecialType == SpecialType.System_Int32); 3694Debug.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(); 137if (IsTypeAllowedInBlobWrapper(elementType.EnumUnderlyingTypeOrSelf().SpecialType)) 184int 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)
1720switch (typeArgument.SpecialType) 2196if (method.ReturnType.IsVoidType() || method.ReturnType.SpecialType == SpecialType.System_Int32) 2221(result!.Type!.IsVoidType() || result.Type!.SpecialType == SpecialType.System_Int32); 2240if (returnType.SpecialType != SpecialType.System_Int32 && !returnType.IsVoidType()) 2277return (array.IsSZArray && array.ElementType.SpecialType == SpecialType.System_String, returnsTaskOrTaskOfInt); 4313if (csharpReturnType.SpecialType != SpecialType.None && 4314csharpLeftType.SpecialType != SpecialType.None && 4315csharpRightType.SpecialType != SpecialType.None) 4322if (csharpReturnType.SpecialType == signature.ReturnType.SpecialType && 4323csharpLeftType.SpecialType == signature.LeftType.SpecialType && 4324csharpRightType.SpecialType == signature.RightType.SpecialType) 4336csharpReturnType.SpecialType is SpecialType.System_Boolean) 4338if ((csharpLeftType.SpecialType, csharpRightType.SpecialType) is 4353csharpReturnType.SpecialType == SpecialType.System_Boolean) 4381csharpReturnType.SpecialType is SpecialType.System_Boolean && 4406csharpRightType.SpecialType == csharpLeftType.GetEnumUnderlyingType()?.SpecialType && 4413csharpLeftType.SpecialType == csharpRightType.GetEnumUnderlyingType()?.SpecialType && 4422csharpReturnType.SpecialType == csharpLeftType.GetEnumUnderlyingType()?.SpecialType && 4436csharpReturnType.SpecialType is SpecialType.System_Boolean && 4437csharpLeftType is PointerTypeSymbol { PointedAtType.SpecialType: SpecialType.System_Void } && 4438csharpRightType is PointerTypeSymbol { PointedAtType.SpecialType: SpecialType.System_Void }) 4473csharpReturnType.SpecialType is SpecialType.System_Int64 && 4492=> type.SpecialType is SpecialType.System_Int32 or SpecialType.System_UInt32 or SpecialType.System_Int64 or SpecialType.System_UInt64; 4538if (csharpReturnType.SpecialType != SpecialType.None && csharpOperandType.SpecialType != SpecialType.None) 4545if (csharpReturnType.SpecialType == signature.ReturnType.SpecialType && 4546csharpOperandType.SpecialType == signature.OperandType.SpecialType)
Compilation\CSharpSemanticModel.cs (1)
3873binaryOperator.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)
359else 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)
258if (namedType.SpecialType != SpecialType.None || namedType.IsErrorType() || !namedType.ContainingAssembly.IsLinked)
FlowAnalysis\AbstractFlowPass.cs (3)
643else if ((object)node.Type == null || node.Type.SpecialType != SpecialType.System_Boolean) 1457switch (t.SpecialType) 1675&& node.Type.SpecialType == SpecialType.System_Boolean)
FlowAnalysis\DefiniteAssignment.cs (3)
365if (methodThisParameter.Type.SpecialType.CanOptimizeBehavior()) 906type.SpecialType != SpecialType.System_String && 907type is not ArrayTypeSymbol { IsSZArray: true, ElementType.SpecialType: SpecialType.System_Byte })
FlowAnalysis\EmptyStructTypeCache.cs (1)
129return nts.IsStructType() && !nts.SpecialType.CanOptimizeBehavior() && !nts.KnownCircularStruct;
FlowAnalysis\NullableWalker.cs (17)
3053returnType.Type.SpecialType == SpecialType.System_Boolean) 3789&& (type.SpecialType == SpecialType.System_Boolean || type.IsDynamic() || type.IsErrorType()); 4653if (type.SpecialType.CanOptimizeBehavior()) 4722if (property.Type.SpecialType != SpecialType.System_Void) 5269Debug.Assert(binary.Type.SpecialType == SpecialType.System_Boolean); 5359Debug.Assert(binary.Type!.SpecialType == SpecialType.System_Boolean); 6729|| method.ReturnType.SpecialType != SpecialType.System_Boolean 7019&& GetTypeOrReturnType(parameter.ContainingSymbol).SpecialType != SpecialType.System_Boolean) 7608if (method.ReturnType.SpecialType == SpecialType.System_Boolean 9000Debug.Assert(containingType.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T); 11504if ((object)getMethod != null && getMethod.ContainingType.SpecialType == SpecialType.System_Nullable_T) 11617(conversion.Kind == ConversionKind.ExplicitReference && resultType.SpecialType == SpecialType.System_String)) 11625if (collectionExpression.Type!.SpecialType == SpecialType.System_Collections_IEnumerable) 11684else if (resultType.SpecialType == SpecialType.System_String) 12328Debug.Assert(node.Type.SpecialType == SpecialType.System_Boolean); 12331if (typeExpr.Type?.SpecialType == SpecialType.System_Object) 12380Debug.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)
247Debug.Assert(e.Property.GetMethod.Parameters[0].Type.SpecialType == SpecialType.System_Int32); 407if (input.Type.SpecialType == SpecialType.System_Double && double.IsNaN(value.DoubleValue) || 408input.Type.SpecialType == SpecialType.System_Single && float.IsNaN(value.SingleValue)) 416if (operatorKind.OperandTypes() == BinaryOperatorKind.Int && comparisonType.SpecialType != SpecialType.System_Int32) 419Debug.Assert(comparisonType.SpecialType switch
Lowering\LocalRewriter\LocalRewriter_BinaryOperator.cs (11)
118Debug.Assert(node.Type.SpecialType == SpecialType.System_String, "Non-string binary addition should have been handled by VisitConversion or VisitArguments"); 1960Debug.Assert(returnType.SpecialType == SpecialType.System_Boolean); 2050BoundExpression result = method.ReturnType.SpecialType == SpecialType.System_Delegate ? 2058Debug.Assert(loweredLeft.Type is { SpecialType: SpecialType.System_Decimal }); 2059Debug.Assert(loweredRight.Type is { SpecialType: SpecialType.System_Decimal }); 2157Debug.Assert(rightType.SpecialType == SpecialType.System_Int32); 2224Debug.Assert(leftType.SpecialType is SpecialType.System_IntPtr or SpecialType.System_UIntPtr); 2229Debug.Assert(rightType.SpecialType == SpecialType.System_Int32); 2323Debug.Assert(sizeOfExpression.Type is { SpecialType: SpecialType.System_Int32 }); 2334var numericSpecialType = numericOperand.Type.SpecialType; 2472Debug.Assert(returnType.SpecialType == SpecialType.System_Int64);
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (4)
408if (collectionType.OriginalDefinition.SpecialType is 528CodeGenerator.IsTypeAllowedInBlobWrapper(elementType.EnumUnderlyingTypeOrSelf().SpecialType) && 789Debug.Assert(indexTemp.Type is { SpecialType: SpecialType.System_Int32 }); 1125Debug.Assert(indexTemp.Type is { SpecialType: SpecialType.System_Int32 });
Lowering\LocalRewriter\LocalRewriter_CompoundAssignmentOperator.cs (2)
207Debug.Assert(node.Operator.ReturnType is { SpecialType: SpecialType.System_String }); 1044type.SpecialType.IsClrInteger() ||
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (33)
97Debug.Assert(byteType.SpecialType == SpecialType.System_Byte); 143Debug.Assert(byteArray.ElementType.SpecialType == SpecialType.System_Byte); 226if (type.SpecialType != SpecialType.System_Double && type.SpecialType != SpecialType.System_Single) 432if (rewrittenType.SpecialType == SpecialType.System_Decimal || rewrittenOperand.Type.SpecialType == SpecialType.System_Decimal) 495if (rewrittenType.SpecialType == SpecialType.System_Decimal) 502else if (rewrittenOperand.Type.SpecialType == SpecialType.System_Decimal) 761type.StrippedType().EnumUnderlyingTypeOrSelf().SpecialType; 823rewrittenOperand.Type.SpecialType != SpecialType.System_Decimal && 824rewrittenOperand.Type.SpecialType != SpecialType.System_DateTime) 1108if (!TypeSymbol.Equals(typeFrom, typeTo, TypeCompareKind.ConsiderEverything2) && (typeFrom.SpecialType == SpecialType.System_Decimal || typeTo.SpecialType == SpecialType.System_Decimal)) 1545SpecialType t0Type = t0.IsEnumType() ? t0.GetEnumUnderlyingType()!.SpecialType : t0.SpecialType; 1546SpecialType s0Type = s0.IsEnumType() ? s0.GetEnumUnderlyingType()!.SpecialType : s0.SpecialType; 1655if (typeFrom.SpecialType == SpecialType.System_Decimal) 1658switch (typeTo.SpecialType) 1672throw ExceptionUtilities.UnexpectedValue(typeTo.SpecialType); 1678switch (typeFrom.SpecialType) 1692throw ExceptionUtilities.UnexpectedValue(typeFrom.SpecialType); 1699Debug.Assert(fromType.SpecialType == SpecialType.System_Decimal || toType.SpecialType == SpecialType.System_Decimal); 1701if (fromType.SpecialType == SpecialType.System_Decimal) 1703switch (toType.SpecialType) 1707operand = RewriteDecimalConversionCore(syntax, operand, fromType, get64BitType(_compilation, signed: toType.SpecialType == SpecialType.System_IntPtr), isImplicit, constantValueOpt); 1713switch (fromType.SpecialType) 1717operand = MakeConversionNode(operand, get64BitType(_compilation, signed: fromType.SpecialType == SpecialType.System_IntPtr), @checked); 1805if (fromType.SpecialType == SpecialType.System_Decimal || toType.SpecialType == SpecialType.System_Decimal) 1820if (fromType.SpecialType == SpecialType.System_Decimal) 1833else 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)
76if (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 (12)
75Debug.Assert(visitedArguments.All(arg => arg.Type!.SpecialType is SpecialType.System_String or SpecialType.System_Char or SpecialType.System_Object)); 110switch (argumentType.SpecialType) 153bool needsImplicitConversionFromStringToSpan = visitedArguments.Any(arg => arg.Type is { SpecialType: SpecialType.System_String }); 222not (BoundCall or BoundConversion { ConversionKind: ConversionKind.Boxing, Type.SpecialType: SpecialType.System_Object, Operand.Type.SpecialType: SpecialType.System_Char }) 286if (argument is BoundConversion { ConversionKind: ConversionKind.Boxing, Type.SpecialType: SpecialType.System_Object, Operand: { Type.SpecialType: SpecialType.System_Char } operand }) 307else if (argument is BoundNullCoalescingOperator { LeftOperand: { Type.SpecialType: SpecialType.System_String } left, RightOperand: BoundLiteral { ConstantValueOpt: { IsString: true, RopeValue.IsEmpty: true } } }) 397if (call is { Arguments: [], ReceiverOpt.Type: NamedTypeSymbol { SpecialType: SpecialType.System_Char } charType, Method: { Name: "ToString" } method } 476if (arg.Type.SpecialType == SpecialType.System_Char) 505Debug.Assert(arg.HasAnyErrors || arg.Type.SpecialType == SpecialType.System_String); 643expr.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)
85Debug.Assert((kind == UnaryOperatorKind.DynamicTrue || kind == UnaryOperatorKind.DynamicFalse) && type.SpecialType == SpecialType.System_Boolean 135var upconvertSpecialType = Binder.GetEnumPromotedType(underlyingType.SpecialType); 136var upconvertType = upconvertSpecialType == underlyingType.SpecialType ? 902Debug.Assert(binaryOperandType.SpecialType != SpecialType.None); 932Debug.Assert(boundOne.Type is { SpecialType: SpecialType.System_Int32 }); 946if (unaryOperandType.SpecialType == SpecialType.System_Decimal) 950else if (unaryOperandType.IsNullableType() && unaryOperandType.GetNullableUnderlyingType().SpecialType == SpecialType.System_Decimal) 985Debug.Assert(operand.Type is { SpecialType: SpecialType.System_Decimal }); 992Debug.Assert(operand.Type is { } && operand.Type.IsNullableType() && operand.Type.GetNullableUnderlyingType().SpecialType == SpecialType.System_Decimal); 1190switch (underlyingType.SpecialType) 1209throw ExceptionUtilities.UnexpectedValue(underlyingType.SpecialType);
Lowering\SpillSequenceSpiller.cs (1)
1147Debug.Assert(condition.Type.SpecialType == SpecialType.System_Boolean);
Lowering\SyntheticBoundNodeFactory.cs (9)
663Debug.Assert(left.Type?.SpecialType == CodeAnalysis.SpecialType.System_Boolean); 664Debug.Assert(right.Type?.SpecialType == CodeAnalysis.SpecialType.System_Boolean); 670Debug.Assert(left.Type?.SpecialType == CodeAnalysis.SpecialType.System_Boolean); 671Debug.Assert(right.Type?.SpecialType == CodeAnalysis.SpecialType.System_Boolean); 787case { SpecialType: CodeAnalysis.SpecialType.System_Double }: 790case { SpecialType: CodeAnalysis.SpecialType.System_Single }: 1083Debug.Assert(ex.Type is { SpecialType: CodeAnalysis.SpecialType.System_Int32 }); 1640Debug.Assert(expression is { Type: { SpecialType: CodeAnalysis.SpecialType.System_Boolean } }); 1840Debug.Assert(returnType.SpecialType == CodeAnalysis.SpecialType.System_Boolean);
Symbols\Attributes\AttributeData.cs (2)
559if (property.TypeWithAnnotations.HasType && property.Type.SpecialType == SpecialType.System_String && 653if (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)
1051switch (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)
213return (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\PEMethodSymbol.cs (1)
1366(method.ContainingType.SpecialType == SpecialType.System_Object &&
Symbols\Metadata\PE\PEModuleSymbol.cs (1)
494if (keepLookingForDeclaredCorTypes && type.SpecialType != SpecialType.None)
Symbols\Metadata\PE\PENamedTypeSymbol.cs (10)
1435if (type.SpecialType.IsValidEnumUnderlyingType() && 1982SpecialType baseCorTypeId = @base.SpecialType; 1998if (this.SpecialType != SpecialType.System_Enum) 2177if (this.SpecialType == Microsoft.CodeAnalysis.SpecialType.None) 2182switch (this.SpecialType) 2258var isOrdinaryEmbeddableStruct = (this.TypeKind == TypeKind.Struct) && (this.SpecialType == Microsoft.CodeAnalysis.SpecialType.None) && this.ContainingAssembly.IsLinked; 2404else if (TypeKind == TypeKind.Class && SpecialType != SpecialType.System_Enum) 2407if (@base?.SpecialType == SpecialType.None && @base.ContainingAssembly?.IsMissing == true) 2862Debug.Assert(this.SpecialType == SpecialType.System_IntPtr || this.SpecialType == SpecialType.System_UIntPtr);
Symbols\Metadata\PE\PETypeParameterSymbol.cs (2)
274else if (typeSymbol.SpecialType == SpecialType.System_ValueType) 292if (typeSymbol.SpecialType == SpecialType.System_ValueType && ((_flags & GenericParameterAttributes.NotNullableValueTypeConstraint) != 0))
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)
790if (this.SpecialType == SpecialType.System_Object) 812if (this.SpecialType == SpecialType.System_Object)
Symbols\NativeIntegerTypeSymbol.cs (4)
34Debug.Assert(underlyingType.SpecialType == SpecialType.System_IntPtr || underlyingType.SpecialType == SpecialType.System_UIntPtr); 311_specialType = _type.UnderlyingNamedType.SpecialType; 318return previous.SpecialType == _specialType ?
Symbols\PublicModel\TypeSymbol.cs (1)
180SpecialType ITypeSymbol.SpecialType => UnderlyingTypeSymbol.SpecialType;
Symbols\Retargeting\RetargetingSymbolTranslator.cs (1)
212return result.SpecialType == SpecialType.None ? result : result.AsNativeInteger();
Symbols\Source\FieldSymbolWithAttributesAndModifiers.cs (1)
275if (this.Type.SpecialType == SpecialType.System_Decimal)
Symbols\Source\ParameterHelpers.cs (2)
974conversion.IsIdentity && parameterType.SpecialType == SpecialType.System_Object && defaultExpression.Type.IsDynamic()) 989defaultExpression.Type.SpecialType == SpecialType.System_String ||
Symbols\Source\SourceAssemblySymbol.cs (1)
2785switch (type.SpecialType)
Symbols\Source\SourceComplexParameterSymbol.cs (1)
978((NamedTypeSymbol)arg.TypeInternal).EnumUnderlyingType.SpecialType :
Symbols\Source\SourceEnumConstantSymbol.cs (1)
157var constantType = this.ContainingType.EnumUnderlyingType.SpecialType;
Symbols\Source\SourceMemberContainerSymbol.cs (3)
2971if (method.IsOverride && method.GetConstructedLeastOverriddenMethod(this, requireSameReturnType: false).ContainingType.SpecialType == Microsoft.CodeAnalysis.SpecialType.System_Object) 4932if (deconstruct.ReturnType.SpecialType != SpecialType.System_Void && !deconstruct.ReturnType.IsErrorType()) 5363if (thisEquals.ReturnType.SpecialType != SpecialType.System_Boolean && !thisEquals.ReturnType.IsErrorType())
Symbols\Source\SourceMemberFieldSymbol.cs (2)
123&& this.Type.SpecialType == SpecialType.System_Decimal) 147if (IsConst && Type.SpecialType == SpecialType.System_Decimal &&
Symbols\Source\SourceMethodSymbolWithAttributes.cs (2)
1003Debug.Assert(arguments.Attribute.AttributeConstructor.Parameters is [{ Type.SpecialType: SpecialType.System_Int32 }, { Type.SpecialType: SpecialType.System_String }]);
Symbols\Source\SourceNamedTypeSymbol.cs (5)
1056Debug.Assert(this.SpecialType == SpecialType.System_Object || this.DeclaringCompilation.IsAttributeType(this)); 1613if ((object)baseType != null && baseType.SpecialType != SpecialType.System_Object) 1797Debug.Assert(this.SpecialType == SpecialType.System_IntPtr || this.SpecialType == SpecialType.System_UIntPtr); 1896(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)) 734if (this.SpecialType == SpecialType.System_Object)
Symbols\Source\SourceNamedTypeSymbol_Enum.cs (1)
66if (!type.SpecialType.IsValidEnumUnderlyingType())
Symbols\Source\SourceNamedTypeSymbol_Extension.cs (2)
228if (namedType.SpecialType == SpecialType.System_Void) 534if (namedType.SpecialType == SpecialType.System_Void)
Symbols\Source\SourceNamespaceSymbol.cs (1)
445if ((object)type != null && type.SpecialType != SpecialType.None)
Symbols\Source\SourceOrdinaryMethodSymbol.cs (2)
143(this.ContainingType.SpecialType == SpecialType.System_TypedReference || this.ContainingType.SpecialType == SpecialType.System_ArgIterator))
Symbols\Source\SourceUserDefinedOperatorSymbolBase.cs (3)
668if ((ContainingType.SpecialType == SpecialType.System_Nullable_T) 818if (this.ReturnType.SpecialType != SpecialType.System_Boolean) 953else if (this.GetParameterType(1).StrippedType().SpecialType != SpecialType.System_Int32)
Symbols\Symbol.cs (1)
1297modifierType.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)
380ReturnType.SpecialType == SpecialType.System_Int32);
Symbols\Synthesized\SynthesizedThrowSwitchExpressionExceptionMethod.cs (1)
33Debug.Assert(unmatchedValue.Type.SpecialType == SpecialType.System_Object);
Symbols\TypeParameterSymbol.cs (1)
420switch (constraint.SpecialType)
Symbols\TypeSymbol.cs (3)
511_ => SpecialTypes.GetTypeCode(SpecialType) 571|| (SpecialType is SpecialType.System_IntPtr or SpecialType.System_UIntPtr && this.ContainingAssembly.RuntimeSupportsNumericIntPtr); 2520SpecialType ITypeSymbolInternal.SpecialType => this.SpecialType;
Symbols\TypeSymbolExtensions.cs (22)
54return typeSymbol.IsReferenceType || typeSymbol.IsEnumType() || typeSymbol.SpecialType.CanBeConst() || typeSymbol.IsNativeIntegerType; 108return type.SpecialType == SpecialType.System_Void; 142return type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T; 161&& nt.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T) 197return type.SpecialType == SpecialType.System_Object; 202return type.SpecialType == SpecialType.System_String; 207return type.SpecialType == SpecialType.System_Char; 212return type.SpecialType.IsIntegralType(); 230return underlyingType is not null && underlyingType.SpecialType.CanOptimizeBehavior(); 383OriginalDefinition.SpecialType: 526SpecialType st = t.SpecialType; 645switch (type.SpecialType) 662return ConstantValue.Default(type.SpecialType); 671return type is object ? type.SpecialType : SpecialType.None; 1345switch (type.SpecialType) 1438switch (type.SpecialType) 1451switch (type.SpecialType) 1503return type.SpecialType.FixedBufferElementSizeInBytes(); 1512return type.SpecialType.IsValidVolatileFieldType(); 1525return ((NamedTypeSymbol)type).EnumUnderlyingType.SpecialType.IsValidVolatileFieldType(); 1562return t.SpecialType.IsPrimitiveRecursiveStruct(); 1651if (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)
220if (type.SpecialType == SpecialType.System_Object)
Utilities\ValueSetFactory.cs (1)
61return ForSpecialType(type.SpecialType, type.IsNativeIntegerType);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (18)
CodeGen\CodeGenAsyncTests.cs (2)
926Assert.Equal(SpecialType.System_Int64, hoistedField.Type.SpecialType); 985Assert.Equal(SpecialType.System_Int64, hoistedField.Type.SpecialType);
CodeGen\CodeGenDynamicTests.cs (2)
594Assert.Equal(SpecialType.System_Object, container.BaseType().SpecialType); 830Assert.Equal(SpecialType.System_MulticastDelegate, d.BaseType().SpecialType);
CodeGen\DestructorTests.cs (2)
601Assert.Equal(SpecialType.System_Int32, intType.SpecialType); 834Assert.Equal(SpecialType.System_Void, destructor.ReturnType.SpecialType);
Emit\EmitMetadataTests.cs (12)
684Assert.Equal(field.Type.SpecialType, fieldType); 951Assert.Equal(SpecialType.System_Int32, pBack.Type.SpecialType); 957Assert.Equal(SpecialType.System_String, qBack.Type.SpecialType); 963Assert.Equal(SpecialType.System_Decimal, rBack.Type.SpecialType); 969Assert.Equal(SpecialType.System_Char, sBack.Type.SpecialType); 1022Assert.Equal(SpecialType.System_Int32, p.Type.SpecialType); 1028Assert.Equal(SpecialType.System_String, qBack.Type.SpecialType); 1034Assert.Equal(SpecialType.System_Decimal, rBack.Type.SpecialType); 1040Assert.Equal(SpecialType.System_Char, sBack.Type.SpecialType); 1281Assert.Equal(SpecialType.System_String, p.Type.SpecialType); 1392Assert.Equal(SpecialType.System_Enum, type.BaseType().SpecialType); 1393Assert.Equal(type.EnumUnderlyingType.SpecialType, underlyingType);
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (3)
Emit\NumericIntPtrTests.cs (3)
1606return type.SpecialType == (signed ? SpecialType.System_IntPtr : SpecialType.System_UIntPtr); 10385Assert.Equal(SpecialType.System_IntPtr, type.SpecialType); 10394Assert.Equal(SpecialType.System_UIntPtr, type.SpecialType);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (29)
Attributes\AttributeTests_Tuples.cs (1)
354Assert.Equal(SpecialType.System_Object, sender.Type.SpecialType);
Semantics\InlineArrayTests.cs (14)
115Assert.Equal(SpecialType.System_Runtime_CompilerServices_InlineArrayAttribute, t.SpecialType); 167Assert.Equal(SpecialType.System_Int32, buffer.TryGetInlineArrayElementField().Type.SpecialType); 196Assert.Equal(SpecialType.System_Int32, bufferOfInt.TryGetInlineArrayElementField().Type.SpecialType); 236Assert.Equal(SpecialType.System_Int32, buffer.TryGetInlineArrayElementField().Type.SpecialType); 590Assert.Equal(SpecialType.System_Int32, buffer.TryGetInlineArrayElementField().Type.SpecialType); 1173Assert.Equal(SpecialType.System_Int32, buffer.TryGetInlineArrayElementField().Type.SpecialType); 1195Assert.Equal(SpecialType.System_Int32, buffer.TryGetInlineArrayElementField().Type.SpecialType); 1225Assert.Equal(SpecialType.System_Int32, buffer.TryGetInlineArrayElementField().Type.SpecialType); 1253Assert.Equal(SpecialType.System_Int32, buffer.TryGetInlineArrayElementField().Type.SpecialType); 1313Assert.Equal(SpecialType.System_Int32, buffer.TryGetInlineArrayElementField().Type.SpecialType); 1339Assert.Equal(SpecialType.System_Int32, buffer.TryGetInlineArrayElementField().Type.SpecialType); 1370Assert.Equal(SpecialType.System_Int32, buffer.TryGetInlineArrayElementField().Type.SpecialType); 1502Assert.Equal(SpecialType.System_Int32, buffer.TryGetInlineArrayElementField().Type.SpecialType); 2239Assert.Equal(SpecialType.System_Int32, buffer.TryGetInlineArrayElementField().Type.SpecialType);
Semantics\PrimaryConstructorTests.cs (13)
412Assert.Equal(SpecialType.System_Int32, x.Type.SpecialType); 416Assert.Equal(SpecialType.System_String, y.Type.SpecialType); 483Assert.Equal(SpecialType.System_Int32, x.Type.SpecialType); 487Assert.Equal(SpecialType.System_String, y.Type.SpecialType); 596Assert.Equal(SpecialType.System_Int32, x.Type.SpecialType); 600Assert.Equal(SpecialType.System_String, y.Type.SpecialType); 682Assert.Equal(SpecialType.System_Int32, a.Type.SpecialType); 686Assert.Equal(SpecialType.System_String, b.Type.SpecialType); 718Assert.Equal(SpecialType.System_Int32, p1.Type.SpecialType); 724Assert.Equal(SpecialType.System_String, p2.Type.SpecialType); 730Assert.Equal(SpecialType.System_Int32, p2.Type.SpecialType); 774Assert.Equal(SpecialType.System_Int32, p1.Type.SpecialType); 779Assert.Equal(SpecialType.System_String, p2.Type.SpecialType);
Semantics\RecordTests.cs (1)
120Assert.Equal(SpecialType.System_Object, point.BaseTypeNoUseSiteDiagnostics.SpecialType);
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (1)
IOperation\IOperationTests_ICompoundAssignmentOperation.cs (1)
86var inSymbol = implicitSymbols.Where(sym => sym.ReturnType.SpecialType == SpecialType.System_Int32).Single();
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (58)
Semantics\DynamicTests.cs (1)
2187Assert.Equal(SpecialType.System_Object, ebc.SpecialType);
Semantics\ForEachTests.cs (17)
1220Assert.Equal(SpecialType.System_Collections_IEnumerable, boundNode.Expression.Type.SpecialType); 1245Assert.Equal(SpecialType.System_String, info.CollectionType.SpecialType); 1258Assert.Equal(SpecialType.System_String, boundNode.Expression.Type.SpecialType); 1259Assert.Equal(SpecialType.System_String, ((BoundConversion)boundNode.Expression).Operand.Type.SpecialType); 1461Assert.Equal(SpecialType.System_Collections_IEnumerable, boundNode.Expression.Type.SpecialType); 1500Assert.Equal(SpecialType.System_Collections_IEnumerable, boundNode.Expression.Type.SpecialType); 1532Assert.Equal(SpecialType.System_Int32, boundNode.IterationVariables.Single().Type.SpecialType); 1551Assert.Equal(SpecialType.System_String, info.CollectionType.SpecialType); 1563Assert.Equal(SpecialType.System_Char, boundNode.IterationVariables.Single().Type.SpecialType); 1592Assert.Equal(SpecialType.System_Int32, boundNode.IterationVariables.Single().Type.SpecialType); 1616Assert.Equal(SpecialType.System_Object, boundNode.IterationVariables.Single().Type.SpecialType); 1668Assert.Equal(SpecialType.System_Collections_IEnumerable, info.CollectionType.SpecialType); 1681Assert.Equal(SpecialType.System_Collections_IEnumerable, boundNode.Expression.Type.SpecialType); 1701Assert.Equal(SpecialType.System_Collections_IEnumerable, info.CollectionType.SpecialType); 1714Assert.Equal(SpecialType.System_Collections_IEnumerable, boundNode.Expression.Type.SpecialType); 3117Assert.Equal(SpecialType.System_String, info.CollectionType.SpecialType); 3129Assert.Equal(SpecialType.System_Char, boundNode.IterationVariables.Single().Type.SpecialType);
Semantics\GenericConstraintsTests.cs (10)
456Assert.Equal(SpecialType.System_Enum, typeParameter.ConstraintTypes().Single().SpecialType); 475Assert.Equal(SpecialType.System_Enum, typeParameter.ConstraintTypes().Single().SpecialType); 494Assert.Equal(SpecialType.System_Enum, typeParameter.ConstraintTypes().Single().SpecialType); 513Assert.Equal(SpecialType.System_Enum, typeParameter.ConstraintTypes().Single().SpecialType); 980Assert.Equal(SpecialType.System_Delegate, typeParameter.ConstraintTypes().Single().SpecialType); 1015Assert.Equal(SpecialType.System_Delegate, typeParameter.ConstraintTypes().Single().SpecialType); 1032Assert.Equal(SpecialType.System_Delegate, typeParameter.ConstraintTypes().Single().SpecialType); 1465Assert.Equal(SpecialType.System_MulticastDelegate, typeParameter.ConstraintTypes().Single().SpecialType); 1500Assert.Equal(SpecialType.System_MulticastDelegate, typeParameter.ConstraintTypes().Single().SpecialType); 1517Assert.Equal(SpecialType.System_MulticastDelegate, typeParameter.ConstraintTypes().Single().SpecialType);
Semantics\ImplicitlyTypedLocalsTests.cs (1)
46Assert.Equal(SpecialType.System_Int32, fieldA.Type.SpecialType);
Semantics\LookupTests.cs (1)
2009var m = ms.Where(mm => mm.Parameters[0].Type.SpecialType == SpecialType.System_Int32).Single();
Semantics\NativeIntegerTests.cs (13)
227Assert.Equal(signed ? SpecialType.System_IntPtr : SpecialType.System_UIntPtr, type.SpecialType); 610return type.Type.VisitType((type, unused1, unused2) => type.SpecialType == specialType && useNativeInteger == type.IsNativeIntegerWrapperType, (object)null) is { }; 734Assert.Equal(specialType, type.SpecialType); 1553Assert.Equal(specialType, underlyingType.SpecialType); 3648Assert.Equal(SpecialType.None, underlyingType0.SpecialType); 3650Assert.Equal(SpecialType.System_UIntPtr, underlyingType1.SpecialType); 3690Assert.Equal(SpecialType.System_Int16, underlyingType0.SpecialType); 3692Assert.Equal(SpecialType.System_Object, underlyingType1.SpecialType); 3724Assert.Equal(SpecialType.System_Int16, underlyingType0.SpecialType); 3726Assert.Equal(SpecialType.System_UIntPtr, underlyingType1.SpecialType); 3758Assert.Equal(SpecialType.System_Int16, underlyingType0.SpecialType); 3760Assert.Equal(SpecialType.System_UIntPtr, underlyingType1.SpecialType); 4847type.SpecialType == (signed ? SpecialType.System_IntPtr : SpecialType.System_UIntPtr);
Semantics\OperatorTests.cs (10)
8181else if (leftType.SpecialType == SpecialType.System_Delegate && rightType.SpecialType == SpecialType.System_Delegate) 8345leftType.SpecialType == SpecialType.System_Boolean || rightType.SpecialType == SpecialType.System_Boolean || 8346(leftType.SpecialType == SpecialType.System_Decimal && (rightType.SpecialType == SpecialType.System_Double || rightType.SpecialType == SpecialType.System_Single)) || 8347(rightType.SpecialType == SpecialType.System_Decimal && (leftType.SpecialType == SpecialType.System_Double || leftType.SpecialType == SpecialType.System_Single))) &&
Semantics\RecordStructTests.cs (2)
395Assert.Equal(SpecialType.System_ValueType, point.BaseTypeNoUseSiteDiagnostics.SpecialType); 485Assert.Equal(SpecialType.System_ValueType, point.BaseTypeNoUseSiteDiagnostics.SpecialType);
Semantics\RefFieldTests.cs (1)
2164Assert.Equal(SpecialType.System_Int16, type.EnumUnderlyingType.SpecialType);
Semantics\UnsafeTests.cs (2)
5947Assert.Equal(SpecialType.System_TypedReference, ((PointerTypeSymbol)returnType).PointedAtType.SpecialType); 5951Assert.Equal(SpecialType.System_TypedReference, ((PointerTypeSymbol)parameterType).PointedAtType.SpecialType);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (119)
Compilation\GetSemanticInfoTests.cs (2)
4064Assert.Equal(SpecialType.System_Collections_Generic_ICollection_T, ((TypeSymbol)reducedFrom1.Parameters[0].Type.OriginalDefinition).SpecialType); 4075Assert.Equal(SpecialType.System_Collections_Generic_ICollection_T, ((TypeSymbol)reducedFrom2.Parameters[0].Type.OriginalDefinition).SpecialType);
DocumentationComments\CrefTests.cs (2)
1270Single(m => m.Parameters.Single().Type.SpecialType == SpecialType.System_Int32); 2841Single(method => method.ParameterTypesWithAnnotations.Single().SpecialType == SpecialType.System_Int32 && method.ReturnType.SpecialType == SpecialType.System_Int32);
Symbols\CompilationCreationTests.cs (5)
76Assert.Equal(SpecialType.None, c107.SpecialType); 92Assert.Equal((SpecialType)i, type.SpecialType); 95Assert.Equal(SpecialType.None, c107.SpecialType); 99Assert.Equal(SpecialType.None, arrayOfc107.SpecialType); 103Assert.Equal(SpecialType.None, c2.GlobalNamespace.GetTypeMembers("C107").Single().SpecialType);
Symbols\CorLibrary\CorTypes.cs (10)
37Assert.Equal((SpecialType)i, t.SpecialType); 66Assert.Equal((SpecialType)i, t.SpecialType); 83Assert.Equal(SpecialType.None, t.SpecialType); 119else if (((NamedTypeSymbol)m).SpecialType != SpecialType.None) 146Assert.Equal((SpecialType)i, t.SpecialType); 149if (t.SpecialType == SpecialType.System_Object) 165Assert.Equal(SpecialType.None, t.SpecialType); 199Assert.Equal((SpecialType)i, t.SpecialType); 211Assert.Equal(SpecialType.None, t.SpecialType); 221Assert.Equal(SpecialType.System_Object, system_object.SpecialType);
Symbols\ExtensionMethodTests.cs (8)
43Assert.Equal(SpecialType.System_Object, parameter.Type.SpecialType); 49Assert.Equal(SpecialType.System_Object, parameter.Type.SpecialType); 2597Assert.Equal(SpecialType.System_Object, method.Parameters.Single().Type.SpecialType); 4034Assert.Equal(SpecialType.System_Int32, parameter.Type.SpecialType); 4040Assert.Equal(SpecialType.System_Int32, parameter.Type.SpecialType); 4064Assert.Equal(SpecialType.System_Int32, parameter.Type.SpecialType); 4070Assert.Equal(SpecialType.System_Int32, parameter.Type.SpecialType); 4095Assert.Equal(SpecialType.System_Void, systemVoidType.SpecialType);
Symbols\FunctionPointerTypeSymbolTests.cs (7)
46Assert.Equal(SpecialType.System_Object, pointerType.Signature.ReturnType.SpecialType); 267Assert.Equal(SpecialType.System_String, pointerType.Signature.ReturnType.SpecialType); 380Assert.Equal(SpecialType.System_Int32, firstParam.Parameters.Single().Type.SpecialType); 383Assert.Equal(SpecialType.System_Object, secondParam.Parameters.Single().Type.SpecialType); 390Assert.Equal(SpecialType.System_Object, fourthParam.Parameters[0].Type.SpecialType); 391Assert.Equal(SpecialType.System_Object, fourthParam.Parameters[1].Type.SpecialType); 396Assert.Equal(SpecialType.System_Object, fifthParam.Parameters[1].Type.SpecialType);
Symbols\GenericConstraintTests.cs (1)
6641Assert.Equal(SpecialType.System_ValueType, typeSymbol.SpecialType);
Symbols\IndexerTests.cs (3)
181Assert.Equal(property.Type.SpecialType, expectedType); 188Assert.Equal(getter.ReturnType.SpecialType, expectedType); 219Assert.Equal(parameter.Type.SpecialType, expectedTypes[i]);
Symbols\Metadata\PE\DynamicTransformsTests.cs (1)
318Assert.Equal(SpecialType.System_Void, prop2.SetMethod.ReturnType.SpecialType);
Symbols\Metadata\PE\LoadingEvents.cs (2)
115Assert.Equal(SpecialType.System_Void, accessor.ReturnType.SpecialType); 180Assert.Equal(SpecialType.System_Int32, nonDelegateEvent.Type.SpecialType);
Symbols\Metadata\PE\LoadingFields.cs (1)
152Assert.Equal(SpecialType.None, readOnlySpanType.SpecialType);
Symbols\Metadata\PE\LoadingIndexers.cs (1)
1086Assert.Equal(SpecialType.System_Void, accessor.ReturnType.SpecialType);
Symbols\MissingSpecialMember.cs (4)
159Assert.Equal(SpecialType.System_String, specialType.SpecialType); 164Assert.Equal(SpecialType.None, lookupType.SpecialType); 237Assert.Equal(SpecialType.System_Nullable_T, specialType.SpecialType); 241Assert.Equal(SpecialType.System_Nullable_T, lookupType.SpecialType);
Symbols\Retargeting\RetargetCustomModifiers.cs (2)
173Assert.Equal(SpecialType.System_Int32, volatileFld.Type.SpecialType); 214Assert.Equal(SpecialType.System_DateTime, p1Type.PointedAtType.SpecialType);
Symbols\Retargeting\RetargetingTests.cs (22)
346Assert.Equal(SpecialType.System_Enum, sourceType.BaseType().SpecialType); 348Assert.Equal(SpecialType.System_Int32, sourceType.EnumUnderlyingType.SpecialType); 355Assert.Equal(SpecialType.System_Enum, retargetingType.BaseType().SpecialType); 357Assert.Equal(SpecialType.System_Int32, retargetingType.EnumUnderlyingType.SpecialType); 383Assert.Equal(SpecialType.System_Enum, sourceType.BaseType().SpecialType); 385Assert.Equal(SpecialType.System_Int16, sourceType.EnumUnderlyingType.SpecialType); 392Assert.Equal(SpecialType.System_Enum, retargetingType.BaseType().SpecialType); 394Assert.Equal(SpecialType.System_Int16, retargetingType.EnumUnderlyingType.SpecialType); 414Assert.Equal(SpecialType.System_Object, sourceType.BaseType().SpecialType); 419Assert.Equal(SpecialType.System_Object, retargetingType.BaseType().SpecialType); 443Assert.Equal(SpecialType.System_Int16, sourceType.BaseType().SpecialType); 449Assert.Equal(SpecialType.System_Int16, retargetingType.BaseType().SpecialType); 492Assert.Equal(SpecialType.System_ValueType, sourceType.BaseType().SpecialType); 497Assert.Equal(SpecialType.System_ValueType, retargetingType.BaseType().SpecialType); 524Assert.Equal(SpecialType.System_Int16, sourceType.Interfaces().Single().SpecialType); 526Assert.Equal(SpecialType.System_ValueType, sourceType.BaseType().SpecialType); 531Assert.Equal(SpecialType.System_Int16, retargetingType.Interfaces().Single().SpecialType); 533Assert.Equal(SpecialType.System_ValueType, retargetingType.BaseType().SpecialType); 582Assert.Equal(SpecialType.System_Int16, sourceType.Interfaces().Single().SpecialType); 588Assert.Equal(SpecialType.System_Int16, retargetingType.Interfaces().Single().SpecialType); 651Assert.Equal(SpecialType.System_Int32, sourceTypeParameterConstraint.SpecialType); 658Assert.Equal(SpecialType.System_Int32, retargetingTypeParameterConstraint.SpecialType);
Symbols\Source\CustomModifierCopyTests.cs (3)
1403Assert.Equal(SpecialType.System_Object, classMethod.ReturnType.SpecialType); 1442Assert.Equal(SpecialType.System_Object, interfaceMethod.ReturnType.SpecialType); 2132return comparisonType.SpecialType == paramSpecialType;
Symbols\Source\DelegateTests.cs (2)
171Assert.Equal(SpecialType.System_AsyncCallback, lastParameterType.SpecialType); 187Assert.Equal(SpecialType.System_IAsyncResult, lastParameterType.SpecialType);
Symbols\Source\EnumTests.cs (1)
1011Assert.Equal(underlyingType, type.SpecialType);
Symbols\Source\ExpressionBodiedPropertyTests.cs (2)
274Assert.Equal(SpecialType.System_Int32, i.Type.SpecialType); 277Assert.Equal(SpecialType.System_Int32, i.Type.SpecialType);
Symbols\Source\MethodTests.cs (4)
1380Assert.Equal(SpecialType.System_Int32, classCBaseTypeArguments[0].SpecialType); 1381Assert.Equal(SpecialType.System_Int64, classCBaseTypeArguments[1].SpecialType); 1908Assert.Equal(SpecialType.System_Void, staticConstructor.ReturnType.SpecialType); 1932Assert.Equal(SpecialType.System_Void, staticConstructor.ReturnType.SpecialType);
Symbols\Source\PropertyTests.cs (20)
1884Assert.True(getters.Any(getter => getter.Parameters[0].Type.SpecialType == SpecialType.System_Int32)); 1885Assert.True(getters.Any(getter => getter.Parameters[0].Type.SpecialType == SpecialType.System_String)); 1888getter.Parameters[0].Type.SpecialType == SpecialType.System_Int32 && 1889getter.Parameters[1].Type.SpecialType == SpecialType.System_String)); 2625Assert.Equal(SpecialType.System_String, iap2.Type.SpecialType); 2627Assert.Equal(SpecialType.System_String, iam2.ReturnType.SpecialType); 2643Assert.Equal(SpecialType.System_String, iap2.Type.SpecialType); 2645Assert.Equal(SpecialType.System_String, iam2.ReturnType.SpecialType); 2661Assert.Equal(SpecialType.System_String, iap2.Type.SpecialType); 2663Assert.Equal(SpecialType.System_String, iam2.ReturnType.SpecialType); 2679Assert.Equal(SpecialType.System_String, iap2.Type.SpecialType); 2681Assert.Equal(SpecialType.System_String, iam2.ReturnType.SpecialType); 2713Assert.Equal(SpecialType.System_Object, iap.Type.SpecialType); 2715Assert.Equal(SpecialType.System_Object, iam.ReturnType.SpecialType); 2718Assert.Equal(SpecialType.System_String, iap2.Type.SpecialType); 2720Assert.Equal(SpecialType.System_String, iam2.ReturnType.SpecialType); 2731Assert.Equal(SpecialType.System_Object, iap.Type.SpecialType); 2733Assert.Equal(SpecialType.System_Object, iam.ReturnType.SpecialType); 2736Assert.Equal(SpecialType.System_String, iap2.Type.SpecialType); 2738Assert.Equal(SpecialType.System_String, iam2.ReturnType.SpecialType);
Symbols\Source\RecordTests.cs (10)
36Assert.Equal(SpecialType.System_Int32, x.Type.SpecialType); 40Assert.Equal(SpecialType.System_String, y.Type.SpecialType); 56Assert.Equal(SpecialType.System_Int32, x.Type.SpecialType); 88Assert.Equal(SpecialType.System_Int32, a.Type.SpecialType); 92Assert.Equal(SpecialType.System_String, b.Type.SpecialType); 121Assert.Equal(SpecialType.System_Int32, p1.Type.SpecialType); 127Assert.Equal(SpecialType.System_String, p2.Type.SpecialType); 133Assert.Equal(SpecialType.System_Int32, p2.Type.SpecialType); 154Assert.Equal(SpecialType.System_Int32, x.Type.SpecialType); 188Assert.Equal(SpecialType.System_Int32, y.Type.SpecialType);
Symbols\Source\TypeMapTests.cs (1)
117Assert.Equal(SpecialType.System_Int32, neti.TypeArguments()[0].SpecialType);
Symbols\TypeResolutionTests.cs (1)
127Assert.Equal(SpecialType.System_Int32, intSym.SpecialType);
Symbols\TypeTests.cs (4)
1254Assert.Equal(SpecialType.System_Object, typeC.BaseType().SpecialType); 1329if (derived.BaseType().SpecialType != SpecialType.System_Object) 1343Assert.Equal(SpecialType.System_Object, derivedTypes[1].BaseType().SpecialType); 1353Assert.Equal(SpecialType.System_Object, derivedTypes[4].BaseType().SpecialType);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (3)
Extensions.cs (2)
577Assert.Equal(SpecialType.System_Void, accessor.ReturnType.SpecialType); 587Assert.Equal(SpecialType.System_Void, accessor.ReturnType.SpecialType);
FunctionPointerUtilities.cs (1)
335=> typeSymbol => Assert.Equal(specialType, typeSymbol.SpecialType);