15210 references to SpecialType
Aspire.Hosting.Analyzers (2)
AppHostAnalyzer.cs (1)
84SymbolEqualityComparer.Default.Equals(parameterData.Symbol.Type, wellKnownTypes.Get(SpecialType.System_String))
Infrastructure\WellKnownTypes.cs (1)
53public INamedTypeSymbol Get(SpecialType type)
ConfigurationSchemaGenerator (43)
RuntimeSource\Configuration.Binder\ConfigurationBindingGenerator.Parser.cs (24)
67type.SpecialType is SpecialType.System_Object or SpecialType.System_Void || 223unboundGeneric.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T) 235if (type is IArrayTypeSymbol { ElementType.SpecialType: SpecialType.System_Byte }) 253SpecialType specialType = namedType.SpecialType; 257case SpecialType.System_String: 258case SpecialType.System_Object: 263case SpecialType.System_Boolean: 264case SpecialType.System_Char: 269case SpecialType.System_Single: 270case SpecialType.System_Double: 271case SpecialType.System_Decimal: 276case SpecialType.System_Byte: 277case SpecialType.System_Int16: 278case SpecialType.System_Int32: 279case SpecialType.System_Int64: 280case SpecialType.System_SByte: 281case SpecialType.System_UInt16: 282case SpecialType.System_UInt32: 283case SpecialType.System_UInt64: 288case SpecialType.System_DateTime: 293case SpecialType.None: 542if (type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T) 962if (firstParam.Name == "argument" && firstParam.Type.SpecialType == SpecialType.System_Object
RuntimeSource\Configuration.Binder\Parser\ConfigurationBinder.cs (5)
58if (@params[1].Type.SpecialType is SpecialType.System_String) 82if (instanceArg.Parameter?.Type.SpecialType is not SpecialType.System_Object) 200if (paramCount > 3 || @params[1].Type.SpecialType is not SpecialType.System_String) 222if (@params[2].Type.SpecialType is not SpecialType.System_String) 234else if (paramCount is 4 && @params[3].Type.SpecialType is SpecialType.System_Object)
RuntimeSource\Configuration.Binder\Parser\KnownTypeSymbols.cs (9)
73String = compilation.GetSpecialType(SpecialType.System_String); 100IEnumerable = compilation.GetSpecialType(SpecialType.System_Collections_IEnumerable); 106GenericICollection = compilation.GetSpecialType(SpecialType.System_Collections_Generic_ICollection_T); 117GenericIEnumerable_Unbound = compilation.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T).ConstructUnboundGenericType(); 118GenericIList_Unbound = compilation.GetSpecialType(SpecialType.System_Collections_Generic_IList_T).ConstructUnboundGenericType(); 126Enum = compilation.GetSpecialType(SpecialType.System_Enum); 132IntPtr = Compilation.GetSpecialType(SpecialType.System_IntPtr); 133UIntPtr = Compilation.GetSpecialType(SpecialType.System_UIntPtr); 134Delegate = Compilation.GetSpecialType(SpecialType.System_Delegate);
RuntimeSource\Configuration.Binder\Parser\OptionsBuilderConfigurationExtensions.cs (1)
79@params[1].Type.SpecialType is SpecialType.System_String &&
RuntimeSource\Configuration.Binder\Parser\OptionsConfigurationServiceCollectionExtensions.cs (2)
44if (secondParamType.SpecialType is SpecialType.System_String && 60@params[1].Type.SpecialType is SpecialType.System_String &&
RuntimeSource\SourceGenerators\TypeRef.cs (2)
34public SpecialType SpecialType { get; } 36public bool CanBeNull => !IsValueType || SpecialType is SpecialType.System_Nullable_T;
GenerateDocumentationAndConfigFiles (424)
src\Compilers\Core\Portable\SpecialTypeExtensions.cs (154)
17public static bool IsClrInteger(this SpecialType specialType) 21case SpecialType.System_Boolean: 22case SpecialType.System_Char: 23case SpecialType.System_Byte: 24case SpecialType.System_SByte: 25case SpecialType.System_Int16: 26case SpecialType.System_UInt16: 27case SpecialType.System_Int32: 28case SpecialType.System_UInt32: 29case SpecialType.System_Int64: 30case SpecialType.System_UInt64: 31case SpecialType.System_IntPtr: 32case SpecialType.System_UIntPtr: 42public static bool IsBlittable(this SpecialType specialType) 46case SpecialType.System_Boolean: 47case SpecialType.System_Char: 48case SpecialType.System_Byte: 49case SpecialType.System_SByte: 50case SpecialType.System_Int16: 51case SpecialType.System_UInt16: 52case SpecialType.System_Int32: 53case SpecialType.System_UInt32: 54case SpecialType.System_Int64: 55case SpecialType.System_UInt64: 56case SpecialType.System_Single: 57case SpecialType.System_Double: 64public static bool IsValueType(this SpecialType specialType) 68case SpecialType.System_Void: 69case SpecialType.System_Boolean: 70case SpecialType.System_Char: 71case SpecialType.System_Byte: 72case SpecialType.System_SByte: 73case SpecialType.System_Int16: 74case SpecialType.System_UInt16: 75case SpecialType.System_Int32: 76case SpecialType.System_UInt32: 77case SpecialType.System_Int64: 78case SpecialType.System_UInt64: 79case SpecialType.System_Single: 80case SpecialType.System_Double: 81case SpecialType.System_Decimal: 82case SpecialType.System_IntPtr: 83case SpecialType.System_UIntPtr: 84case SpecialType.System_Nullable_T: 85case SpecialType.System_DateTime: 86case SpecialType.System_TypedReference: 87case SpecialType.System_ArgIterator: 88case SpecialType.System_RuntimeArgumentHandle: 89case SpecialType.System_RuntimeFieldHandle: 90case SpecialType.System_RuntimeMethodHandle: 91case SpecialType.System_RuntimeTypeHandle: 98public static int SizeInBytes(this SpecialType specialType) 102case SpecialType.System_SByte: 104case SpecialType.System_Byte: 106case SpecialType.System_Int16: 108case SpecialType.System_UInt16: 110case SpecialType.System_Int32: 112case SpecialType.System_UInt32: 114case SpecialType.System_Int64: 116case SpecialType.System_UInt64: 118case SpecialType.System_Char: 120case SpecialType.System_Single: 122case SpecialType.System_Double: 124case SpecialType.System_Boolean: 127case SpecialType.System_Decimal: 141public static bool IsPrimitiveRecursiveStruct(this SpecialType specialType) 145case SpecialType.System_Boolean: 146case SpecialType.System_Byte: 147case SpecialType.System_Char: 148case SpecialType.System_Double: 149case SpecialType.System_Int16: 150case SpecialType.System_Int32: 151case SpecialType.System_Int64: 152case SpecialType.System_UInt16: 153case SpecialType.System_UInt32: 154case SpecialType.System_UInt64: 155case SpecialType.System_IntPtr: 156case SpecialType.System_UIntPtr: 157case SpecialType.System_SByte: 158case SpecialType.System_Single: 165public static bool IsValidEnumUnderlyingType(this SpecialType specialType) 169case SpecialType.System_Byte: 170case SpecialType.System_SByte: 171case SpecialType.System_Int16: 172case SpecialType.System_UInt16: 173case SpecialType.System_Int32: 174case SpecialType.System_UInt32: 175case SpecialType.System_Int64: 176case SpecialType.System_UInt64: 183public static bool IsNumericType(this SpecialType specialType) 187case SpecialType.System_Byte: 188case SpecialType.System_SByte: 189case SpecialType.System_Int16: 190case SpecialType.System_UInt16: 191case SpecialType.System_Int32: 192case SpecialType.System_UInt32: 193case SpecialType.System_Int64: 194case SpecialType.System_UInt64: 195case SpecialType.System_Single: 196case SpecialType.System_Double: 197case SpecialType.System_Decimal: 207public static bool IsIntegralType(this SpecialType specialType) 211case SpecialType.System_Byte: 212case SpecialType.System_SByte: 213case SpecialType.System_Int16: 214case SpecialType.System_UInt16: 215case SpecialType.System_Int32: 216case SpecialType.System_UInt32: 217case SpecialType.System_Int64: 218case SpecialType.System_UInt64: 225public static bool IsUnsignedIntegralType(this SpecialType specialType) 229case SpecialType.System_Byte: 230case SpecialType.System_UInt16: 231case SpecialType.System_UInt32: 232case SpecialType.System_UInt64: 239public static bool IsSignedIntegralType(this SpecialType specialType) 243case SpecialType.System_SByte: 244case SpecialType.System_Int16: 245case SpecialType.System_Int32: 246case SpecialType.System_Int64: 258public static int VBForToShiftBits(this SpecialType specialType) 262case SpecialType.System_SByte: 264case SpecialType.System_Int16: 266case SpecialType.System_Int32: 268case SpecialType.System_Int64: 275public static SpecialType FromRuntimeTypeOfLiteralValue(object value) 282return SpecialType.System_Int32; 287return SpecialType.System_String; 292return SpecialType.System_Boolean; 297return SpecialType.System_Char; 302return SpecialType.System_Int64; 307return SpecialType.System_Double; 312return SpecialType.System_UInt32; 317return SpecialType.System_UInt64; 322return SpecialType.System_Single; 327return SpecialType.System_Decimal; 332return SpecialType.System_Int16; 337return SpecialType.System_UInt16; 342return SpecialType.System_DateTime; 347return SpecialType.System_Byte; 352return SpecialType.System_SByte; 355return SpecialType.None; 365public static bool CanOptimizeBehavior(this SpecialType specialType) 366=> specialType is >= SpecialType.System_Object and <= SpecialType.System_Runtime_CompilerServices_InlineArrayAttribute; 371internal static ulong ConvertUnderlyingValueToUInt64(this SpecialType enumUnderlyingType, object value) 379SpecialType.System_SByte => (ulong)(sbyte)value, 380SpecialType.System_Int16 => (ulong)(short)value, 381SpecialType.System_Int32 => (ulong)(int)value, 382SpecialType.System_Int64 => (ulong)(long)value, 383SpecialType.System_Byte => (byte)value, 384SpecialType.System_UInt16 => (ushort)value, 385SpecialType.System_UInt32 => (uint)value, 386SpecialType.System_UInt64 => (ulong)value,
src\RoslynAnalyzers\Utilities\Compiler\DiagnosticHelpers.cs (11)
11public static bool TryConvertToUInt64(object? value, SpecialType specialType, out ulong convertedValue) 19case SpecialType.System_Int16: 23case SpecialType.System_Int32: 27case SpecialType.System_Int64: 31case SpecialType.System_UInt16: 35case SpecialType.System_UInt32: 39case SpecialType.System_UInt64: 43case SpecialType.System_Byte: 47case SpecialType.System_SByte: 51case SpecialType.System_Char: 55case SpecialType.System_Boolean:
src\RoslynAnalyzers\Utilities\Compiler\DoNotCatchGeneralUnlessRethrown.cs (1)
104compilation.GetSpecialType(SpecialType.System_Object),
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IMethodSymbolExtensions.cs (16)
31method.ReturnType.SpecialType == SpecialType.System_Boolean && 33method.Parameters[0].Type.SpecialType == SpecialType.System_Object && 43method.ContainingType.SpecialType == SpecialType.System_Object && 46method.ReturnType.SpecialType == SpecialType.System_Boolean && 48method.Parameters[0].Type.SpecialType == SpecialType.System_Object; 58method.ContainingType.SpecialType == SpecialType.System_Object && 60method.ReturnType.SpecialType == SpecialType.System_Boolean && 61method.Parameters[0].Type.SpecialType == SpecialType.System_Object && 62method.Parameters[1].Type.SpecialType == SpecialType.System_Object && 74if (overriddenMethod.ContainingType.SpecialType == SpecialType.System_Object) 189parameter.Type.SpecialType == SpecialType.System_Boolean && 238method.Parameters[0].Type.SpecialType == SpecialType.System_Boolean; 407method.Parameters[0].Type.SpecialType == SpecialType.System_Boolean && 421method.Parameters[1].Type.SpecialType == SpecialType.System_Boolean && 500method.Parameters[0].Type.SpecialType == SpecialType.System_Object; 540method.ReturnType.SpecialType == SpecialType.System_Boolean &&
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ITypeSymbolExtensions.cs (16)
22SpecialType.System_Boolean 23or SpecialType.System_Byte 24or SpecialType.System_Char 25or SpecialType.System_Double 26or SpecialType.System_Int16 27or SpecialType.System_Int32 28or SpecialType.System_Int64 29or SpecialType.System_UInt16 30or SpecialType.System_UInt32 31or SpecialType.System_UInt64 32or SpecialType.System_SByte 33or SpecialType.System_Single 34or SpecialType.System_String => true, 251=> typeSymbol.IsValueType || typeSymbol.SpecialType == SpecialType.System_String; 259=> typeSymbol != null && typeSymbol.IsValueType && typeSymbol.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T; 265=> typeSymbol.IsNullableValueType() && ((INamedTypeSymbol)typeSymbol).TypeArguments[0].SpecialType == SpecialType.System_Boolean;
src\RoslynAnalyzers\Utilities\Workspaces\SyntaxGeneratorExtensions.cs (4)
330generator.TypeExpression(SpecialType.System_Boolean), 386generator.ParameterDeclaration(argumentName.ToString(), generator.TypeExpression(SpecialType.System_Object)) 388returnType: generator.TypeExpression(SpecialType.System_Boolean), 409returnType: generator.TypeExpression(SpecialType.System_Int32),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (2)
157type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T || 174if (type.SpecialType == SpecialType.System_String)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SemanticFacts\ISemanticFactsExtensions.cs (2)
119=> type?.SpecialType is SpecialType.System_Single or SpecialType.System_Double;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Simplification\SpecialTypeAnnotation.cs (8)
14private static readonly ConcurrentDictionary<SpecialType, string> s_fromSpecialTypes = new(); 15private static readonly ConcurrentDictionary<string, SpecialType> s_toSpecialTypes = new(); 17public static SyntaxAnnotation Create(SpecialType specialType) 20public static SpecialType GetSpecialType(SyntaxAnnotation annotation) 23private static string CreateFromSpecialTypes(SpecialType arg) 26private static SpecialType CreateToSpecialTypes(string arg) 27=> (SpecialType)Enum.Parse(typeof(SpecialType), arg);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.NamedTypeSymbolKey.cs (1)
26visitor.WriteBoolean(symbol.SpecialType == SpecialType.System_IntPtr);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (6)
758&& symbol.ContainingType.SpecialType == SpecialType.System_Object 1017if (newReceiverType.SpecialType != SpecialType.None) 1024return newSymbolContainingType.SpecialType is SpecialType.System_Array or 1025SpecialType.System_Delegate or 1026SpecialType.System_Enum or 1027SpecialType.System_String;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (9)
58private static object CreateOne(SpecialType specialType) 61SpecialType.System_SByte => (sbyte)1, 62SpecialType.System_Byte => (byte)1, 63SpecialType.System_Int16 => (short)1, 64SpecialType.System_UInt16 => (ushort)1, 65SpecialType.System_Int32 => 1, 66SpecialType.System_UInt32 => (uint)1, 67SpecialType.System_Int64 => (long)1, 68SpecialType.System_UInt64 => (ulong)1,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IntegerUtilities.cs (7)
60public static long Convert(long v, SpecialType type) 63SpecialType.System_SByte => unchecked((sbyte)v), 64SpecialType.System_Byte => unchecked((byte)v), 65SpecialType.System_Int16 => unchecked((short)v), 66SpecialType.System_UInt16 => unchecked((ushort)v), 67SpecialType.System_Int32 => unchecked((int)v), 68SpecialType.System_UInt32 => unchecked((uint)v),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\IMethodSymbolExtensions.cs (2)
46method.Parameters is [{ Type.SpecialType: SpecialType.System_Object }, var secondParam] && 107methodSymbol.ReturnType.SpecialType == SpecialType.System_Int32 ||
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (1)
664ContainingType.SpecialType: SpecialType.System_Object,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (4)
512.Select(p => (p.Type ?? compilation.GetSpecialType(SpecialType.System_Object)).WithNullableAnnotation(p.NullableAnnotation)); 517types = types.Concat((method.ReturnType ?? compilation.GetSpecialType(SpecialType.System_Object)).WithNullableAnnotation(method.ReturnNullableAnnotation)); 680if (!returnType.GetMembers().OfType<IPropertySymbol>().Any(p => p.Name == WellKnownMemberNames.IsCompleted && p.Type.SpecialType == SpecialType.System_Boolean && p.GetMethod != null)) 730ReturnType.SpecialType: SpecialType.System_Boolean,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (56)
55=> symbol?.SpecialType == SpecialType.System_Void; 58=> symbol?.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T; 268case SpecialType.System_Array or SpecialType.System_ValueType: 271case SpecialType.System_Delegate: 272case SpecialType.System_MulticastDelegate: 273case SpecialType.System_Enum: 286case SpecialType.System_Byte: 287case SpecialType.System_SByte: 288case SpecialType.System_Int16: 289case SpecialType.System_UInt16: 290case SpecialType.System_Int32: 291case SpecialType.System_UInt32: 292case SpecialType.System_Int64: 293case SpecialType.System_UInt64: 294case SpecialType.System_Single: 295case SpecialType.System_Double: 296case SpecialType.System_Decimal: 297case SpecialType.System_IntPtr when type.IsNativeIntegerType: 298case SpecialType.System_UIntPtr when type.IsNativeIntegerType: 374case SpecialType.System_Object: 375case SpecialType.System_Void: 376case SpecialType.System_Boolean: 377case SpecialType.System_SByte: 378case SpecialType.System_Byte: 379case SpecialType.System_Decimal: 380case SpecialType.System_Single: 381case SpecialType.System_Double: 382case SpecialType.System_Int16: 383case SpecialType.System_Int32: 384case SpecialType.System_Int64: 385case SpecialType.System_Char: 386case SpecialType.System_String: 387case SpecialType.System_UInt16: 388case SpecialType.System_UInt32: 389case SpecialType.System_UInt64: 390case SpecialType.System_IntPtr when symbol.IsNativeIntegerType: 391case SpecialType.System_UIntPtr when symbol.IsNativeIntegerType: 402typeSymbol.AllInterfaces.Any(static i => i.SpecialType == SpecialType.System_Collections_IEnumerable) && 651case SpecialType.System_Boolean: 652case SpecialType.System_Char: 653case SpecialType.System_SByte: 654case SpecialType.System_Byte: 655case SpecialType.System_Int16: 656case SpecialType.System_UInt16: 657case SpecialType.System_Int32: 658case SpecialType.System_UInt32: 659case SpecialType.System_Int64: 660case SpecialType.System_UInt64: 661case SpecialType.System_Decimal: 662case SpecialType.System_Single: 663case SpecialType.System_Double: 666case SpecialType.System_IntPtr: 667case SpecialType.System_UIntPtr: 670case SpecialType.System_DateTime: 759namedType.OriginalDefinition.GetAttributes().Any(static a => a.AttributeClass?.SpecialType == SpecialType.System_Runtime_CompilerServices_InlineArrayAttribute);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\PredefinedTypeExtensions.cs (41)
13public static SpecialType ToSpecialType(this PredefinedType predefinedType) 16PredefinedType.Object => SpecialType.System_Object, 17PredefinedType.Void => SpecialType.System_Void, 18PredefinedType.Boolean => SpecialType.System_Boolean, 19PredefinedType.Char => SpecialType.System_Char, 20PredefinedType.SByte => SpecialType.System_SByte, 21PredefinedType.Byte => SpecialType.System_Byte, 22PredefinedType.Int16 => SpecialType.System_Int16, 23PredefinedType.UInt16 => SpecialType.System_UInt16, 24PredefinedType.Int32 => SpecialType.System_Int32, 25PredefinedType.UInt32 => SpecialType.System_UInt32, 26PredefinedType.Int64 => SpecialType.System_Int64, 27PredefinedType.UInt64 => SpecialType.System_UInt64, 28PredefinedType.Decimal => SpecialType.System_Decimal, 29PredefinedType.Single => SpecialType.System_Single, 30PredefinedType.Double => SpecialType.System_Double, 31PredefinedType.String => SpecialType.System_String, 32PredefinedType.DateTime => SpecialType.System_DateTime, 33PredefinedType.IntPtr => SpecialType.System_IntPtr, 34PredefinedType.UIntPtr => SpecialType.System_UIntPtr, 35_ => SpecialType.None, 38public static PredefinedType ToPredefinedType(this SpecialType specialType) 41SpecialType.System_Object => PredefinedType.Object, 42SpecialType.System_Void => PredefinedType.Void, 43SpecialType.System_Boolean => PredefinedType.Boolean, 44SpecialType.System_Char => PredefinedType.Char, 45SpecialType.System_SByte => PredefinedType.SByte, 46SpecialType.System_Byte => PredefinedType.Byte, 47SpecialType.System_Int16 => PredefinedType.Int16, 48SpecialType.System_UInt16 => PredefinedType.UInt16, 49SpecialType.System_Int32 => PredefinedType.Int32, 50SpecialType.System_UInt32 => PredefinedType.UInt32, 51SpecialType.System_Int64 => PredefinedType.Int64, 52SpecialType.System_UInt64 => PredefinedType.UInt64, 53SpecialType.System_Decimal => PredefinedType.Decimal, 54SpecialType.System_Single => PredefinedType.Single, 55SpecialType.System_Double => PredefinedType.Double, 56SpecialType.System_String => PredefinedType.String, 57SpecialType.System_DateTime => PredefinedType.DateTime, 58SpecialType.System_IntPtr => PredefinedType.IntPtr, 59SpecialType.System_UIntPtr => PredefinedType.UIntPtr,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.cs (1)
198=> symbol.IsKind(SymbolKind.NamedType, out ITypeSymbol? typeSymbol) && typeSymbol.SpecialType == SpecialType.System_Object;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractFlagsEnumGenerator.cs (5)
15protected abstract SyntaxNode CreateExplicitlyCastedLiteralValue(INamedTypeSymbol enumType, SpecialType underlyingSpecialType, object constantValue); 78var underlyingSpecialType = enumType.EnumUnderlyingType.SpecialType; 138IFieldSymbol field, INamedTypeSymbol enumType, SpecialType underlyingSpecialType) 172var underlyingSpecialType = enumType.EnumUnderlyingType.SpecialType; 188var underlyingSpecialType = enumType.EnumUnderlyingType.SpecialType;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (12)
83public static bool IsSpecialType([NotNullWhen(true)] ITypeSymbol? type, SpecialType specialType) 136SpecialType.System_SByte => value is sbyte, 137SpecialType.System_Byte => value is byte, 138SpecialType.System_Int16 => value is short, 139SpecialType.System_UInt16 => value is ushort, 140SpecialType.System_Int32 => value is int, 141SpecialType.System_UInt32 => value is uint, 142SpecialType.System_Int64 => value is long, 143SpecialType.System_UInt64 => value is ulong, 144SpecialType.System_Decimal => value is decimal, 145SpecialType.System_Single => value is float, 146SpecialType.System_Double => value is double,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationSymbolFactory.cs (5)
422SpecialType specialType = SpecialType.None, 441SpecialType specialType = SpecialType.None, 493specialType: SpecialType.None,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\LiteralSpecialValues.cs (11)
16public static bool HasSpecialValues(SpecialType specialType) 20case SpecialType.System_SByte: 21case SpecialType.System_Int16: 22case SpecialType.System_UInt16: 23case SpecialType.System_Int32: 24case SpecialType.System_UInt32: 25case SpecialType.System_Int64: 26case SpecialType.System_UInt64: 27case SpecialType.System_Single: 28case SpecialType.System_Double: 29case SpecialType.System_Decimal:
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationAbstractNamedTypeSymbol.cs (1)
29SpecialType specialType,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationArrayTypeSymbol.cs (1)
10internal sealed class CodeGenerationArrayTypeSymbol(ITypeSymbol elementType, int rank, NullableAnnotation nullableAnnotation) : CodeGenerationTypeSymbol(null, null, default, Accessibility.NotApplicable, default, string.Empty, SpecialType.None, nullableAnnotation), IArrayTypeSymbol
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationMethodSymbol.cs (1)
75=> this.ReturnType == null || this.ReturnType.SpecialType == SpecialType.System_Void;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationNamedTypeSymbol.cs (1)
34SpecialType specialType,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationPointerTypeSymbol.cs (1)
9internal sealed class CodeGenerationPointerTypeSymbol(ITypeSymbol pointedAtType) : CodeGenerationTypeSymbol(null, null, default, Accessibility.NotApplicable, default, string.Empty, SpecialType.None, NullableAnnotation.None), IPointerTypeSymbol
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationTypeParameterSymbol.cs (1)
24int ordinal) : CodeGenerationTypeSymbol(containingType?.ContainingAssembly, containingType, attributes, Accessibility.NotApplicable, default, name, SpecialType.None, nullableAnnotation), ITypeParameterSymbol
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationTypeSymbol.cs (2)
19SpecialType specialType, 23public SpecialType SpecialType { get; protected set; } = specialType;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (1)
85_ => compilation.GetSpecialType(SpecialType.System_Object),
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (19)
50returnType: compilation.GetSpecialType(SpecialType.System_Boolean), 55parameters: [CodeGenerationSymbolFactory.CreateParameterSymbol(compilation.GetSpecialType(SpecialType.System_Object).WithNullableAnnotation(NullableAnnotation.Annotated), ObjName)], 411case SpecialType.System_Boolean: 412case SpecialType.System_Char: 413case SpecialType.System_SByte: 414case SpecialType.System_Byte: 415case SpecialType.System_Int16: 416case SpecialType.System_UInt16: 417case SpecialType.System_Int32: 418case SpecialType.System_UInt32: 419case SpecialType.System_Int64: 420case SpecialType.System_UInt64: 421case SpecialType.System_Decimal: 422case SpecialType.System_Single: 423case SpecialType.System_Double: 424case SpecialType.System_String: 425case SpecialType.System_DateTime: 443method.ReturnType.SpecialType == SpecialType.System_Boolean && 444method.Parameters[0].Type.SpecialType == SpecialType.System_Object &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateGetHashCodeMethod.cs (4)
136? factory.SimpleLocalDeclarationStatement(generatorInternal, compilation.GetSpecialType(SpecialType.System_Int32), HashCodeName, CreateLiteralExpression(factory, initHash)) 137: factory.LocalDeclarationStatement(compilation.GetSpecialType(SpecialType.System_Int64), HashCodeName, CreateLiteralExpression(factory, initHash))); 166compilation.GetSpecialType(SpecialType.System_Int32), 210method.ReturnType.SpecialType == SpecialType.System_Int32 &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (12)
60SpecialType? patternValueType, 184else if (operation is IIsTypeOperation { TypeOperand.SpecialType: SpecialType.System_Object } && generatorInternal.SupportsPatterns(semanticModel.SyntaxTree.Options)) 305SpecialType? patternValueType) 307if (patternValueType is SpecialType specialType && specialType.IsNumericType()) 447if (containingType?.SpecialType == SpecialType.System_Array || 448containingType?.SpecialType == SpecialType.System_String) 458case SpecialType.System_Byte: 459case SpecialType.System_UInt16: 460case SpecialType.System_UInt32: 461case SpecialType.System_UInt64: 497SpecialType? patternValueType) 504if (patternValueType == SpecialType.System_Boolean)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.AbstractTypeInferrer.cs (2)
78protected IEnumerable<TypeInferenceInfo> CreateResult(SpecialType type, NullableAnnotation nullableAnnotation = NullableAnnotation.None) 120symbol.ContainingType?.SpecialType == SpecialType.System_Enum;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.cs (1)
46? [semanticModel.Compilation.GetSpecialType(SpecialType.System_Boolean)]
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\SimplificationHelpers.cs (2)
77var specialType = SpecialTypeAnnotation.GetSpecialType(annotation2); 78if (specialType != SpecialType.None)
ILLink.RoslynAnalyzer (23)
ISymbolExtensions.cs (1)
222methodSymbol.ReturnType.SpecialType == SpecialType.System_Int32 ||
ITypeSymbolExtensions.cs (5)
21if (type.SpecialType is SpecialType.System_String && !isByRef) 76SpecialType.System_String => WellKnownType.System_String, 77SpecialType.System_Nullable_T => WellKnownType.System_Nullable_T, 78SpecialType.System_Array => WellKnownType.System_Array, 79SpecialType.System_Object => WellKnownType.System_Object,
RequiresAnalyzerBase.cs (1)
346if (!propertySymbol.IsStatic || propertySymbol.Type.SpecialType != SpecialType.System_Boolean || propertySymbol.SetMethod != null)
RequiresAssemblyFilesAnalyzer.cs (1)
136attribute.ConstructorArguments.Length >= 1 && attribute.ConstructorArguments is [{ Type.SpecialType: SpecialType.System_String }, ..];
RequiresDynamicCodeAnalyzer.cs (1)
167attribute.ConstructorArguments.Length >= 1 && attribute.ConstructorArguments is [{ Type.SpecialType: SpecialType.System_String }, ..];
RequiresUnreferencedCodeUtils.cs (1)
37=> attribute.ConstructorArguments.Length >= 1 && attribute.ConstructorArguments is [{ Type.SpecialType: SpecialType.System_String }, ..];
TrimAnalysis\FeatureCheckReturnValuePattern.cs (1)
40if (!OwningSymbol.IsStatic || OwningSymbol.Type.SpecialType != SpecialType.System_Boolean || OwningSymbol.SetMethod != null)
TrimAnalysis\GenericParameterProxy.cs (1)
21if (constraintType.SpecialType == SpecialType.System_Enum)
TrimAnalysis\MethodProxy.cs (1)
56internal partial bool ReturnsVoid() => Method.ReturnType.SpecialType == SpecialType.System_Void;
TrimAnalysis\SingleValueExtensions.cs (1)
16if (type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T)
TrimAnalysis\TrimAnalysisVisitor.cs (9)
192(operation.Type?.TypeKind == TypeKind.Enum || operation.Type?.SpecialType == SpecialType.System_Int32)) 506case SpecialType.System_String when constantValue is string stringConstantValue: 509case SpecialType.System_Boolean when constantValue is bool boolConstantValue: 512case SpecialType.System_SByte when constantValue is sbyte sbyteConstantValue: 515case SpecialType.System_Byte when constantValue is byte byteConstantValue: 518case SpecialType.System_Int16 when constantValue is short int16ConstantValue: 521case SpecialType.System_UInt16 when constantValue is ushort uint16ConstantValue: 524case SpecialType.System_Int32 when constantValue is int int32ConstantValue: 527case SpecialType.System_UInt32 when constantValue is uint uint32ConstantValue:
Metrics (361)
src\Compilers\Core\Portable\SpecialTypeExtensions.cs (154)
17public static bool IsClrInteger(this SpecialType specialType) 21case SpecialType.System_Boolean: 22case SpecialType.System_Char: 23case SpecialType.System_Byte: 24case SpecialType.System_SByte: 25case SpecialType.System_Int16: 26case SpecialType.System_UInt16: 27case SpecialType.System_Int32: 28case SpecialType.System_UInt32: 29case SpecialType.System_Int64: 30case SpecialType.System_UInt64: 31case SpecialType.System_IntPtr: 32case SpecialType.System_UIntPtr: 42public static bool IsBlittable(this SpecialType specialType) 46case SpecialType.System_Boolean: 47case SpecialType.System_Char: 48case SpecialType.System_Byte: 49case SpecialType.System_SByte: 50case SpecialType.System_Int16: 51case SpecialType.System_UInt16: 52case SpecialType.System_Int32: 53case SpecialType.System_UInt32: 54case SpecialType.System_Int64: 55case SpecialType.System_UInt64: 56case SpecialType.System_Single: 57case SpecialType.System_Double: 64public static bool IsValueType(this SpecialType specialType) 68case SpecialType.System_Void: 69case SpecialType.System_Boolean: 70case SpecialType.System_Char: 71case SpecialType.System_Byte: 72case SpecialType.System_SByte: 73case SpecialType.System_Int16: 74case SpecialType.System_UInt16: 75case SpecialType.System_Int32: 76case SpecialType.System_UInt32: 77case SpecialType.System_Int64: 78case SpecialType.System_UInt64: 79case SpecialType.System_Single: 80case SpecialType.System_Double: 81case SpecialType.System_Decimal: 82case SpecialType.System_IntPtr: 83case SpecialType.System_UIntPtr: 84case SpecialType.System_Nullable_T: 85case SpecialType.System_DateTime: 86case SpecialType.System_TypedReference: 87case SpecialType.System_ArgIterator: 88case SpecialType.System_RuntimeArgumentHandle: 89case SpecialType.System_RuntimeFieldHandle: 90case SpecialType.System_RuntimeMethodHandle: 91case SpecialType.System_RuntimeTypeHandle: 98public static int SizeInBytes(this SpecialType specialType) 102case SpecialType.System_SByte: 104case SpecialType.System_Byte: 106case SpecialType.System_Int16: 108case SpecialType.System_UInt16: 110case SpecialType.System_Int32: 112case SpecialType.System_UInt32: 114case SpecialType.System_Int64: 116case SpecialType.System_UInt64: 118case SpecialType.System_Char: 120case SpecialType.System_Single: 122case SpecialType.System_Double: 124case SpecialType.System_Boolean: 127case SpecialType.System_Decimal: 141public static bool IsPrimitiveRecursiveStruct(this SpecialType specialType) 145case SpecialType.System_Boolean: 146case SpecialType.System_Byte: 147case SpecialType.System_Char: 148case SpecialType.System_Double: 149case SpecialType.System_Int16: 150case SpecialType.System_Int32: 151case SpecialType.System_Int64: 152case SpecialType.System_UInt16: 153case SpecialType.System_UInt32: 154case SpecialType.System_UInt64: 155case SpecialType.System_IntPtr: 156case SpecialType.System_UIntPtr: 157case SpecialType.System_SByte: 158case SpecialType.System_Single: 165public static bool IsValidEnumUnderlyingType(this SpecialType specialType) 169case SpecialType.System_Byte: 170case SpecialType.System_SByte: 171case SpecialType.System_Int16: 172case SpecialType.System_UInt16: 173case SpecialType.System_Int32: 174case SpecialType.System_UInt32: 175case SpecialType.System_Int64: 176case SpecialType.System_UInt64: 183public static bool IsNumericType(this SpecialType specialType) 187case SpecialType.System_Byte: 188case SpecialType.System_SByte: 189case SpecialType.System_Int16: 190case SpecialType.System_UInt16: 191case SpecialType.System_Int32: 192case SpecialType.System_UInt32: 193case SpecialType.System_Int64: 194case SpecialType.System_UInt64: 195case SpecialType.System_Single: 196case SpecialType.System_Double: 197case SpecialType.System_Decimal: 207public static bool IsIntegralType(this SpecialType specialType) 211case SpecialType.System_Byte: 212case SpecialType.System_SByte: 213case SpecialType.System_Int16: 214case SpecialType.System_UInt16: 215case SpecialType.System_Int32: 216case SpecialType.System_UInt32: 217case SpecialType.System_Int64: 218case SpecialType.System_UInt64: 225public static bool IsUnsignedIntegralType(this SpecialType specialType) 229case SpecialType.System_Byte: 230case SpecialType.System_UInt16: 231case SpecialType.System_UInt32: 232case SpecialType.System_UInt64: 239public static bool IsSignedIntegralType(this SpecialType specialType) 243case SpecialType.System_SByte: 244case SpecialType.System_Int16: 245case SpecialType.System_Int32: 246case SpecialType.System_Int64: 258public static int VBForToShiftBits(this SpecialType specialType) 262case SpecialType.System_SByte: 264case SpecialType.System_Int16: 266case SpecialType.System_Int32: 268case SpecialType.System_Int64: 275public static SpecialType FromRuntimeTypeOfLiteralValue(object value) 282return SpecialType.System_Int32; 287return SpecialType.System_String; 292return SpecialType.System_Boolean; 297return SpecialType.System_Char; 302return SpecialType.System_Int64; 307return SpecialType.System_Double; 312return SpecialType.System_UInt32; 317return SpecialType.System_UInt64; 322return SpecialType.System_Single; 327return SpecialType.System_Decimal; 332return SpecialType.System_Int16; 337return SpecialType.System_UInt16; 342return SpecialType.System_DateTime; 347return SpecialType.System_Byte; 352return SpecialType.System_SByte; 355return SpecialType.None; 365public static bool CanOptimizeBehavior(this SpecialType specialType) 366=> specialType is >= SpecialType.System_Object and <= SpecialType.System_Runtime_CompilerServices_InlineArrayAttribute; 371internal static ulong ConvertUnderlyingValueToUInt64(this SpecialType enumUnderlyingType, object value) 379SpecialType.System_SByte => (ulong)(sbyte)value, 380SpecialType.System_Int16 => (ulong)(short)value, 381SpecialType.System_Int32 => (ulong)(int)value, 382SpecialType.System_Int64 => (ulong)(long)value, 383SpecialType.System_Byte => (byte)value, 384SpecialType.System_UInt16 => (ushort)value, 385SpecialType.System_UInt32 => (uint)value, 386SpecialType.System_UInt64 => (ulong)value,
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (19)
340(binaryOperation.Type.SpecialType == SpecialType.System_Boolean && 374SpecialType.System_Boolean 375or SpecialType.System_Byte 376or SpecialType.System_Char 377or SpecialType.System_Double 378or SpecialType.System_Int16 379or SpecialType.System_Int32 380or SpecialType.System_Int64 381or SpecialType.System_UInt16 382or SpecialType.System_UInt32 383or SpecialType.System_UInt64 384or SpecialType.System_IntPtr 385or SpecialType.System_UIntPtr 386or SpecialType.System_SByte 387or SpecialType.System_Single 388or SpecialType.System_String 389or SpecialType.System_Object 390or SpecialType.System_ValueType 391or SpecialType.System_Void => true,
src\RoslynAnalyzers\Utilities\Compiler\DiagnosticHelpers.cs (11)
11public static bool TryConvertToUInt64(object? value, SpecialType specialType, out ulong convertedValue) 19case SpecialType.System_Int16: 23case SpecialType.System_Int32: 27case SpecialType.System_Int64: 31case SpecialType.System_UInt16: 35case SpecialType.System_UInt32: 39case SpecialType.System_UInt64: 43case SpecialType.System_Byte: 47case SpecialType.System_SByte: 51case SpecialType.System_Char: 55case SpecialType.System_Boolean:
src\RoslynAnalyzers\Utilities\Compiler\DoNotCatchGeneralUnlessRethrown.cs (1)
104compilation.GetSpecialType(SpecialType.System_Object),
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IMethodSymbolExtensions.cs (16)
31method.ReturnType.SpecialType == SpecialType.System_Boolean && 33method.Parameters[0].Type.SpecialType == SpecialType.System_Object && 43method.ContainingType.SpecialType == SpecialType.System_Object && 46method.ReturnType.SpecialType == SpecialType.System_Boolean && 48method.Parameters[0].Type.SpecialType == SpecialType.System_Object; 58method.ContainingType.SpecialType == SpecialType.System_Object && 60method.ReturnType.SpecialType == SpecialType.System_Boolean && 61method.Parameters[0].Type.SpecialType == SpecialType.System_Object && 62method.Parameters[1].Type.SpecialType == SpecialType.System_Object && 74if (overriddenMethod.ContainingType.SpecialType == SpecialType.System_Object) 189parameter.Type.SpecialType == SpecialType.System_Boolean && 238method.Parameters[0].Type.SpecialType == SpecialType.System_Boolean; 407method.Parameters[0].Type.SpecialType == SpecialType.System_Boolean && 421method.Parameters[1].Type.SpecialType == SpecialType.System_Boolean && 500method.Parameters[0].Type.SpecialType == SpecialType.System_Object; 540method.ReturnType.SpecialType == SpecialType.System_Boolean &&
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ITypeSymbolExtensions.cs (16)
22SpecialType.System_Boolean 23or SpecialType.System_Byte 24or SpecialType.System_Char 25or SpecialType.System_Double 26or SpecialType.System_Int16 27or SpecialType.System_Int32 28or SpecialType.System_Int64 29or SpecialType.System_UInt16 30or SpecialType.System_UInt32 31or SpecialType.System_UInt64 32or SpecialType.System_SByte 33or SpecialType.System_Single 34or SpecialType.System_String => true, 251=> typeSymbol.IsValueType || typeSymbol.SpecialType == SpecialType.System_String; 259=> typeSymbol != null && typeSymbol.IsValueType && typeSymbol.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T; 265=> typeSymbol.IsNullableValueType() && ((INamedTypeSymbol)typeSymbol).TypeArguments[0].SpecialType == SpecialType.System_Boolean;
src\RoslynAnalyzers\Utilities\Workspaces\SyntaxGeneratorExtensions.cs (4)
330generator.TypeExpression(SpecialType.System_Boolean), 386generator.ParameterDeclaration(argumentName.ToString(), generator.TypeExpression(SpecialType.System_Object)) 388returnType: generator.TypeExpression(SpecialType.System_Boolean), 409returnType: generator.TypeExpression(SpecialType.System_Int32),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (2)
157type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T || 174if (type.SpecialType == SpecialType.System_String)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SemanticFacts\ISemanticFactsExtensions.cs (2)
119=> type?.SpecialType is SpecialType.System_Single or SpecialType.System_Double;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Simplification\SpecialTypeAnnotation.cs (8)
14private static readonly ConcurrentDictionary<SpecialType, string> s_fromSpecialTypes = new(); 15private static readonly ConcurrentDictionary<string, SpecialType> s_toSpecialTypes = new(); 17public static SyntaxAnnotation Create(SpecialType specialType) 20public static SpecialType GetSpecialType(SyntaxAnnotation annotation) 23private static string CreateFromSpecialTypes(SpecialType arg) 26private static SpecialType CreateToSpecialTypes(string arg) 27=> (SpecialType)Enum.Parse(typeof(SpecialType), arg);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.NamedTypeSymbolKey.cs (1)
26visitor.WriteBoolean(symbol.SpecialType == SpecialType.System_IntPtr);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (6)
758&& symbol.ContainingType.SpecialType == SpecialType.System_Object 1017if (newReceiverType.SpecialType != SpecialType.None) 1024return newSymbolContainingType.SpecialType is SpecialType.System_Array or 1025SpecialType.System_Delegate or 1026SpecialType.System_Enum or 1027SpecialType.System_String;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (9)
58private static object CreateOne(SpecialType specialType) 61SpecialType.System_SByte => (sbyte)1, 62SpecialType.System_Byte => (byte)1, 63SpecialType.System_Int16 => (short)1, 64SpecialType.System_UInt16 => (ushort)1, 65SpecialType.System_Int32 => 1, 66SpecialType.System_UInt32 => (uint)1, 67SpecialType.System_Int64 => (long)1, 68SpecialType.System_UInt64 => (ulong)1,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IntegerUtilities.cs (7)
60public static long Convert(long v, SpecialType type) 63SpecialType.System_SByte => unchecked((sbyte)v), 64SpecialType.System_Byte => unchecked((byte)v), 65SpecialType.System_Int16 => unchecked((short)v), 66SpecialType.System_UInt16 => unchecked((ushort)v), 67SpecialType.System_Int32 => unchecked((int)v), 68SpecialType.System_UInt32 => unchecked((uint)v),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\IMethodSymbolExtensions.cs (2)
46method.Parameters is [{ Type.SpecialType: SpecialType.System_Object }, var secondParam] && 107methodSymbol.ReturnType.SpecialType == SpecialType.System_Int32 ||
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (1)
664ContainingType.SpecialType: SpecialType.System_Object,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (4)
512.Select(p => (p.Type ?? compilation.GetSpecialType(SpecialType.System_Object)).WithNullableAnnotation(p.NullableAnnotation)); 517types = types.Concat((method.ReturnType ?? compilation.GetSpecialType(SpecialType.System_Object)).WithNullableAnnotation(method.ReturnNullableAnnotation)); 680if (!returnType.GetMembers().OfType<IPropertySymbol>().Any(p => p.Name == WellKnownMemberNames.IsCompleted && p.Type.SpecialType == SpecialType.System_Boolean && p.GetMethod != null)) 730ReturnType.SpecialType: SpecialType.System_Boolean,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (56)
55=> symbol?.SpecialType == SpecialType.System_Void; 58=> symbol?.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T; 268case SpecialType.System_Array or SpecialType.System_ValueType: 271case SpecialType.System_Delegate: 272case SpecialType.System_MulticastDelegate: 273case SpecialType.System_Enum: 286case SpecialType.System_Byte: 287case SpecialType.System_SByte: 288case SpecialType.System_Int16: 289case SpecialType.System_UInt16: 290case SpecialType.System_Int32: 291case SpecialType.System_UInt32: 292case SpecialType.System_Int64: 293case SpecialType.System_UInt64: 294case SpecialType.System_Single: 295case SpecialType.System_Double: 296case SpecialType.System_Decimal: 297case SpecialType.System_IntPtr when type.IsNativeIntegerType: 298case SpecialType.System_UIntPtr when type.IsNativeIntegerType: 374case SpecialType.System_Object: 375case SpecialType.System_Void: 376case SpecialType.System_Boolean: 377case SpecialType.System_SByte: 378case SpecialType.System_Byte: 379case SpecialType.System_Decimal: 380case SpecialType.System_Single: 381case SpecialType.System_Double: 382case SpecialType.System_Int16: 383case SpecialType.System_Int32: 384case SpecialType.System_Int64: 385case SpecialType.System_Char: 386case SpecialType.System_String: 387case SpecialType.System_UInt16: 388case SpecialType.System_UInt32: 389case SpecialType.System_UInt64: 390case SpecialType.System_IntPtr when symbol.IsNativeIntegerType: 391case SpecialType.System_UIntPtr when symbol.IsNativeIntegerType: 402typeSymbol.AllInterfaces.Any(static i => i.SpecialType == SpecialType.System_Collections_IEnumerable) && 651case SpecialType.System_Boolean: 652case SpecialType.System_Char: 653case SpecialType.System_SByte: 654case SpecialType.System_Byte: 655case SpecialType.System_Int16: 656case SpecialType.System_UInt16: 657case SpecialType.System_Int32: 658case SpecialType.System_UInt32: 659case SpecialType.System_Int64: 660case SpecialType.System_UInt64: 661case SpecialType.System_Decimal: 662case SpecialType.System_Single: 663case SpecialType.System_Double: 666case SpecialType.System_IntPtr: 667case SpecialType.System_UIntPtr: 670case SpecialType.System_DateTime: 759namedType.OriginalDefinition.GetAttributes().Any(static a => a.AttributeClass?.SpecialType == SpecialType.System_Runtime_CompilerServices_InlineArrayAttribute);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\PredefinedTypeExtensions.cs (41)
13public static SpecialType ToSpecialType(this PredefinedType predefinedType) 16PredefinedType.Object => SpecialType.System_Object, 17PredefinedType.Void => SpecialType.System_Void, 18PredefinedType.Boolean => SpecialType.System_Boolean, 19PredefinedType.Char => SpecialType.System_Char, 20PredefinedType.SByte => SpecialType.System_SByte, 21PredefinedType.Byte => SpecialType.System_Byte, 22PredefinedType.Int16 => SpecialType.System_Int16, 23PredefinedType.UInt16 => SpecialType.System_UInt16, 24PredefinedType.Int32 => SpecialType.System_Int32, 25PredefinedType.UInt32 => SpecialType.System_UInt32, 26PredefinedType.Int64 => SpecialType.System_Int64, 27PredefinedType.UInt64 => SpecialType.System_UInt64, 28PredefinedType.Decimal => SpecialType.System_Decimal, 29PredefinedType.Single => SpecialType.System_Single, 30PredefinedType.Double => SpecialType.System_Double, 31PredefinedType.String => SpecialType.System_String, 32PredefinedType.DateTime => SpecialType.System_DateTime, 33PredefinedType.IntPtr => SpecialType.System_IntPtr, 34PredefinedType.UIntPtr => SpecialType.System_UIntPtr, 35_ => SpecialType.None, 38public static PredefinedType ToPredefinedType(this SpecialType specialType) 41SpecialType.System_Object => PredefinedType.Object, 42SpecialType.System_Void => PredefinedType.Void, 43SpecialType.System_Boolean => PredefinedType.Boolean, 44SpecialType.System_Char => PredefinedType.Char, 45SpecialType.System_SByte => PredefinedType.SByte, 46SpecialType.System_Byte => PredefinedType.Byte, 47SpecialType.System_Int16 => PredefinedType.Int16, 48SpecialType.System_UInt16 => PredefinedType.UInt16, 49SpecialType.System_Int32 => PredefinedType.Int32, 50SpecialType.System_UInt32 => PredefinedType.UInt32, 51SpecialType.System_Int64 => PredefinedType.Int64, 52SpecialType.System_UInt64 => PredefinedType.UInt64, 53SpecialType.System_Decimal => PredefinedType.Decimal, 54SpecialType.System_Single => PredefinedType.Single, 55SpecialType.System_Double => PredefinedType.Double, 56SpecialType.System_String => PredefinedType.String, 57SpecialType.System_DateTime => PredefinedType.DateTime, 58SpecialType.System_IntPtr => PredefinedType.IntPtr, 59SpecialType.System_UIntPtr => PredefinedType.UIntPtr,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.cs (1)
198=> symbol.IsKind(SymbolKind.NamedType, out ITypeSymbol? typeSymbol) && typeSymbol.SpecialType == SpecialType.System_Object;
Metrics.Legacy (361)
src\Compilers\Core\Portable\SpecialTypeExtensions.cs (154)
17public static bool IsClrInteger(this SpecialType specialType) 21case SpecialType.System_Boolean: 22case SpecialType.System_Char: 23case SpecialType.System_Byte: 24case SpecialType.System_SByte: 25case SpecialType.System_Int16: 26case SpecialType.System_UInt16: 27case SpecialType.System_Int32: 28case SpecialType.System_UInt32: 29case SpecialType.System_Int64: 30case SpecialType.System_UInt64: 31case SpecialType.System_IntPtr: 32case SpecialType.System_UIntPtr: 42public static bool IsBlittable(this SpecialType specialType) 46case SpecialType.System_Boolean: 47case SpecialType.System_Char: 48case SpecialType.System_Byte: 49case SpecialType.System_SByte: 50case SpecialType.System_Int16: 51case SpecialType.System_UInt16: 52case SpecialType.System_Int32: 53case SpecialType.System_UInt32: 54case SpecialType.System_Int64: 55case SpecialType.System_UInt64: 56case SpecialType.System_Single: 57case SpecialType.System_Double: 64public static bool IsValueType(this SpecialType specialType) 68case SpecialType.System_Void: 69case SpecialType.System_Boolean: 70case SpecialType.System_Char: 71case SpecialType.System_Byte: 72case SpecialType.System_SByte: 73case SpecialType.System_Int16: 74case SpecialType.System_UInt16: 75case SpecialType.System_Int32: 76case SpecialType.System_UInt32: 77case SpecialType.System_Int64: 78case SpecialType.System_UInt64: 79case SpecialType.System_Single: 80case SpecialType.System_Double: 81case SpecialType.System_Decimal: 82case SpecialType.System_IntPtr: 83case SpecialType.System_UIntPtr: 84case SpecialType.System_Nullable_T: 85case SpecialType.System_DateTime: 86case SpecialType.System_TypedReference: 87case SpecialType.System_ArgIterator: 88case SpecialType.System_RuntimeArgumentHandle: 89case SpecialType.System_RuntimeFieldHandle: 90case SpecialType.System_RuntimeMethodHandle: 91case SpecialType.System_RuntimeTypeHandle: 98public static int SizeInBytes(this SpecialType specialType) 102case SpecialType.System_SByte: 104case SpecialType.System_Byte: 106case SpecialType.System_Int16: 108case SpecialType.System_UInt16: 110case SpecialType.System_Int32: 112case SpecialType.System_UInt32: 114case SpecialType.System_Int64: 116case SpecialType.System_UInt64: 118case SpecialType.System_Char: 120case SpecialType.System_Single: 122case SpecialType.System_Double: 124case SpecialType.System_Boolean: 127case SpecialType.System_Decimal: 141public static bool IsPrimitiveRecursiveStruct(this SpecialType specialType) 145case SpecialType.System_Boolean: 146case SpecialType.System_Byte: 147case SpecialType.System_Char: 148case SpecialType.System_Double: 149case SpecialType.System_Int16: 150case SpecialType.System_Int32: 151case SpecialType.System_Int64: 152case SpecialType.System_UInt16: 153case SpecialType.System_UInt32: 154case SpecialType.System_UInt64: 155case SpecialType.System_IntPtr: 156case SpecialType.System_UIntPtr: 157case SpecialType.System_SByte: 158case SpecialType.System_Single: 165public static bool IsValidEnumUnderlyingType(this SpecialType specialType) 169case SpecialType.System_Byte: 170case SpecialType.System_SByte: 171case SpecialType.System_Int16: 172case SpecialType.System_UInt16: 173case SpecialType.System_Int32: 174case SpecialType.System_UInt32: 175case SpecialType.System_Int64: 176case SpecialType.System_UInt64: 183public static bool IsNumericType(this SpecialType specialType) 187case SpecialType.System_Byte: 188case SpecialType.System_SByte: 189case SpecialType.System_Int16: 190case SpecialType.System_UInt16: 191case SpecialType.System_Int32: 192case SpecialType.System_UInt32: 193case SpecialType.System_Int64: 194case SpecialType.System_UInt64: 195case SpecialType.System_Single: 196case SpecialType.System_Double: 197case SpecialType.System_Decimal: 207public static bool IsIntegralType(this SpecialType specialType) 211case SpecialType.System_Byte: 212case SpecialType.System_SByte: 213case SpecialType.System_Int16: 214case SpecialType.System_UInt16: 215case SpecialType.System_Int32: 216case SpecialType.System_UInt32: 217case SpecialType.System_Int64: 218case SpecialType.System_UInt64: 225public static bool IsUnsignedIntegralType(this SpecialType specialType) 229case SpecialType.System_Byte: 230case SpecialType.System_UInt16: 231case SpecialType.System_UInt32: 232case SpecialType.System_UInt64: 239public static bool IsSignedIntegralType(this SpecialType specialType) 243case SpecialType.System_SByte: 244case SpecialType.System_Int16: 245case SpecialType.System_Int32: 246case SpecialType.System_Int64: 258public static int VBForToShiftBits(this SpecialType specialType) 262case SpecialType.System_SByte: 264case SpecialType.System_Int16: 266case SpecialType.System_Int32: 268case SpecialType.System_Int64: 275public static SpecialType FromRuntimeTypeOfLiteralValue(object value) 282return SpecialType.System_Int32; 287return SpecialType.System_String; 292return SpecialType.System_Boolean; 297return SpecialType.System_Char; 302return SpecialType.System_Int64; 307return SpecialType.System_Double; 312return SpecialType.System_UInt32; 317return SpecialType.System_UInt64; 322return SpecialType.System_Single; 327return SpecialType.System_Decimal; 332return SpecialType.System_Int16; 337return SpecialType.System_UInt16; 342return SpecialType.System_DateTime; 347return SpecialType.System_Byte; 352return SpecialType.System_SByte; 355return SpecialType.None; 365public static bool CanOptimizeBehavior(this SpecialType specialType) 366=> specialType is >= SpecialType.System_Object and <= SpecialType.System_Runtime_CompilerServices_InlineArrayAttribute; 371internal static ulong ConvertUnderlyingValueToUInt64(this SpecialType enumUnderlyingType, object value) 379SpecialType.System_SByte => (ulong)(sbyte)value, 380SpecialType.System_Int16 => (ulong)(short)value, 381SpecialType.System_Int32 => (ulong)(int)value, 382SpecialType.System_Int64 => (ulong)(long)value, 383SpecialType.System_Byte => (byte)value, 384SpecialType.System_UInt16 => (ushort)value, 385SpecialType.System_UInt32 => (uint)value, 386SpecialType.System_UInt64 => (ulong)value,
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (19)
340(binaryOperation.Type.SpecialType == SpecialType.System_Boolean && 374SpecialType.System_Boolean 375or SpecialType.System_Byte 376or SpecialType.System_Char 377or SpecialType.System_Double 378or SpecialType.System_Int16 379or SpecialType.System_Int32 380or SpecialType.System_Int64 381or SpecialType.System_UInt16 382or SpecialType.System_UInt32 383or SpecialType.System_UInt64 384or SpecialType.System_IntPtr 385or SpecialType.System_UIntPtr 386or SpecialType.System_SByte 387or SpecialType.System_Single 388or SpecialType.System_String 389or SpecialType.System_Object 390or SpecialType.System_ValueType 391or SpecialType.System_Void => true,
src\RoslynAnalyzers\Utilities\Compiler\DiagnosticHelpers.cs (11)
11public static bool TryConvertToUInt64(object? value, SpecialType specialType, out ulong convertedValue) 19case SpecialType.System_Int16: 23case SpecialType.System_Int32: 27case SpecialType.System_Int64: 31case SpecialType.System_UInt16: 35case SpecialType.System_UInt32: 39case SpecialType.System_UInt64: 43case SpecialType.System_Byte: 47case SpecialType.System_SByte: 51case SpecialType.System_Char: 55case SpecialType.System_Boolean:
src\RoslynAnalyzers\Utilities\Compiler\DoNotCatchGeneralUnlessRethrown.cs (1)
104compilation.GetSpecialType(SpecialType.System_Object),
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IMethodSymbolExtensions.cs (16)
31method.ReturnType.SpecialType == SpecialType.System_Boolean && 33method.Parameters[0].Type.SpecialType == SpecialType.System_Object && 43method.ContainingType.SpecialType == SpecialType.System_Object && 46method.ReturnType.SpecialType == SpecialType.System_Boolean && 48method.Parameters[0].Type.SpecialType == SpecialType.System_Object; 58method.ContainingType.SpecialType == SpecialType.System_Object && 60method.ReturnType.SpecialType == SpecialType.System_Boolean && 61method.Parameters[0].Type.SpecialType == SpecialType.System_Object && 62method.Parameters[1].Type.SpecialType == SpecialType.System_Object && 74if (overriddenMethod.ContainingType.SpecialType == SpecialType.System_Object) 189parameter.Type.SpecialType == SpecialType.System_Boolean && 238method.Parameters[0].Type.SpecialType == SpecialType.System_Boolean; 407method.Parameters[0].Type.SpecialType == SpecialType.System_Boolean && 421method.Parameters[1].Type.SpecialType == SpecialType.System_Boolean && 500method.Parameters[0].Type.SpecialType == SpecialType.System_Object; 540method.ReturnType.SpecialType == SpecialType.System_Boolean &&
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ITypeSymbolExtensions.cs (16)
22SpecialType.System_Boolean 23or SpecialType.System_Byte 24or SpecialType.System_Char 25or SpecialType.System_Double 26or SpecialType.System_Int16 27or SpecialType.System_Int32 28or SpecialType.System_Int64 29or SpecialType.System_UInt16 30or SpecialType.System_UInt32 31or SpecialType.System_UInt64 32or SpecialType.System_SByte 33or SpecialType.System_Single 34or SpecialType.System_String => true, 251=> typeSymbol.IsValueType || typeSymbol.SpecialType == SpecialType.System_String; 259=> typeSymbol != null && typeSymbol.IsValueType && typeSymbol.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T; 265=> typeSymbol.IsNullableValueType() && ((INamedTypeSymbol)typeSymbol).TypeArguments[0].SpecialType == SpecialType.System_Boolean;
src\RoslynAnalyzers\Utilities\Workspaces\SyntaxGeneratorExtensions.cs (4)
330generator.TypeExpression(SpecialType.System_Boolean), 386generator.ParameterDeclaration(argumentName.ToString(), generator.TypeExpression(SpecialType.System_Object)) 388returnType: generator.TypeExpression(SpecialType.System_Boolean), 409returnType: generator.TypeExpression(SpecialType.System_Int32),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (2)
157type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T || 174if (type.SpecialType == SpecialType.System_String)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SemanticFacts\ISemanticFactsExtensions.cs (2)
119=> type?.SpecialType is SpecialType.System_Single or SpecialType.System_Double;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Simplification\SpecialTypeAnnotation.cs (8)
14private static readonly ConcurrentDictionary<SpecialType, string> s_fromSpecialTypes = new(); 15private static readonly ConcurrentDictionary<string, SpecialType> s_toSpecialTypes = new(); 17public static SyntaxAnnotation Create(SpecialType specialType) 20public static SpecialType GetSpecialType(SyntaxAnnotation annotation) 23private static string CreateFromSpecialTypes(SpecialType arg) 26private static SpecialType CreateToSpecialTypes(string arg) 27=> (SpecialType)Enum.Parse(typeof(SpecialType), arg);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.NamedTypeSymbolKey.cs (1)
26visitor.WriteBoolean(symbol.SpecialType == SpecialType.System_IntPtr);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (6)
758&& symbol.ContainingType.SpecialType == SpecialType.System_Object 1017if (newReceiverType.SpecialType != SpecialType.None) 1024return newSymbolContainingType.SpecialType is SpecialType.System_Array or 1025SpecialType.System_Delegate or 1026SpecialType.System_Enum or 1027SpecialType.System_String;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (9)
58private static object CreateOne(SpecialType specialType) 61SpecialType.System_SByte => (sbyte)1, 62SpecialType.System_Byte => (byte)1, 63SpecialType.System_Int16 => (short)1, 64SpecialType.System_UInt16 => (ushort)1, 65SpecialType.System_Int32 => 1, 66SpecialType.System_UInt32 => (uint)1, 67SpecialType.System_Int64 => (long)1, 68SpecialType.System_UInt64 => (ulong)1,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IntegerUtilities.cs (7)
60public static long Convert(long v, SpecialType type) 63SpecialType.System_SByte => unchecked((sbyte)v), 64SpecialType.System_Byte => unchecked((byte)v), 65SpecialType.System_Int16 => unchecked((short)v), 66SpecialType.System_UInt16 => unchecked((ushort)v), 67SpecialType.System_Int32 => unchecked((int)v), 68SpecialType.System_UInt32 => unchecked((uint)v),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\IMethodSymbolExtensions.cs (2)
46method.Parameters is [{ Type.SpecialType: SpecialType.System_Object }, var secondParam] && 107methodSymbol.ReturnType.SpecialType == SpecialType.System_Int32 ||
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (1)
664ContainingType.SpecialType: SpecialType.System_Object,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (4)
512.Select(p => (p.Type ?? compilation.GetSpecialType(SpecialType.System_Object)).WithNullableAnnotation(p.NullableAnnotation)); 517types = types.Concat((method.ReturnType ?? compilation.GetSpecialType(SpecialType.System_Object)).WithNullableAnnotation(method.ReturnNullableAnnotation)); 680if (!returnType.GetMembers().OfType<IPropertySymbol>().Any(p => p.Name == WellKnownMemberNames.IsCompleted && p.Type.SpecialType == SpecialType.System_Boolean && p.GetMethod != null)) 730ReturnType.SpecialType: SpecialType.System_Boolean,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (56)
55=> symbol?.SpecialType == SpecialType.System_Void; 58=> symbol?.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T; 268case SpecialType.System_Array or SpecialType.System_ValueType: 271case SpecialType.System_Delegate: 272case SpecialType.System_MulticastDelegate: 273case SpecialType.System_Enum: 286case SpecialType.System_Byte: 287case SpecialType.System_SByte: 288case SpecialType.System_Int16: 289case SpecialType.System_UInt16: 290case SpecialType.System_Int32: 291case SpecialType.System_UInt32: 292case SpecialType.System_Int64: 293case SpecialType.System_UInt64: 294case SpecialType.System_Single: 295case SpecialType.System_Double: 296case SpecialType.System_Decimal: 297case SpecialType.System_IntPtr when type.IsNativeIntegerType: 298case SpecialType.System_UIntPtr when type.IsNativeIntegerType: 374case SpecialType.System_Object: 375case SpecialType.System_Void: 376case SpecialType.System_Boolean: 377case SpecialType.System_SByte: 378case SpecialType.System_Byte: 379case SpecialType.System_Decimal: 380case SpecialType.System_Single: 381case SpecialType.System_Double: 382case SpecialType.System_Int16: 383case SpecialType.System_Int32: 384case SpecialType.System_Int64: 385case SpecialType.System_Char: 386case SpecialType.System_String: 387case SpecialType.System_UInt16: 388case SpecialType.System_UInt32: 389case SpecialType.System_UInt64: 390case SpecialType.System_IntPtr when symbol.IsNativeIntegerType: 391case SpecialType.System_UIntPtr when symbol.IsNativeIntegerType: 402typeSymbol.AllInterfaces.Any(static i => i.SpecialType == SpecialType.System_Collections_IEnumerable) && 651case SpecialType.System_Boolean: 652case SpecialType.System_Char: 653case SpecialType.System_SByte: 654case SpecialType.System_Byte: 655case SpecialType.System_Int16: 656case SpecialType.System_UInt16: 657case SpecialType.System_Int32: 658case SpecialType.System_UInt32: 659case SpecialType.System_Int64: 660case SpecialType.System_UInt64: 661case SpecialType.System_Decimal: 662case SpecialType.System_Single: 663case SpecialType.System_Double: 666case SpecialType.System_IntPtr: 667case SpecialType.System_UIntPtr: 670case SpecialType.System_DateTime: 759namedType.OriginalDefinition.GetAttributes().Any(static a => a.AttributeClass?.SpecialType == SpecialType.System_Runtime_CompilerServices_InlineArrayAttribute);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\PredefinedTypeExtensions.cs (41)
13public static SpecialType ToSpecialType(this PredefinedType predefinedType) 16PredefinedType.Object => SpecialType.System_Object, 17PredefinedType.Void => SpecialType.System_Void, 18PredefinedType.Boolean => SpecialType.System_Boolean, 19PredefinedType.Char => SpecialType.System_Char, 20PredefinedType.SByte => SpecialType.System_SByte, 21PredefinedType.Byte => SpecialType.System_Byte, 22PredefinedType.Int16 => SpecialType.System_Int16, 23PredefinedType.UInt16 => SpecialType.System_UInt16, 24PredefinedType.Int32 => SpecialType.System_Int32, 25PredefinedType.UInt32 => SpecialType.System_UInt32, 26PredefinedType.Int64 => SpecialType.System_Int64, 27PredefinedType.UInt64 => SpecialType.System_UInt64, 28PredefinedType.Decimal => SpecialType.System_Decimal, 29PredefinedType.Single => SpecialType.System_Single, 30PredefinedType.Double => SpecialType.System_Double, 31PredefinedType.String => SpecialType.System_String, 32PredefinedType.DateTime => SpecialType.System_DateTime, 33PredefinedType.IntPtr => SpecialType.System_IntPtr, 34PredefinedType.UIntPtr => SpecialType.System_UIntPtr, 35_ => SpecialType.None, 38public static PredefinedType ToPredefinedType(this SpecialType specialType) 41SpecialType.System_Object => PredefinedType.Object, 42SpecialType.System_Void => PredefinedType.Void, 43SpecialType.System_Boolean => PredefinedType.Boolean, 44SpecialType.System_Char => PredefinedType.Char, 45SpecialType.System_SByte => PredefinedType.SByte, 46SpecialType.System_Byte => PredefinedType.Byte, 47SpecialType.System_Int16 => PredefinedType.Int16, 48SpecialType.System_UInt16 => PredefinedType.UInt16, 49SpecialType.System_Int32 => PredefinedType.Int32, 50SpecialType.System_UInt32 => PredefinedType.UInt32, 51SpecialType.System_Int64 => PredefinedType.Int64, 52SpecialType.System_UInt64 => PredefinedType.UInt64, 53SpecialType.System_Decimal => PredefinedType.Decimal, 54SpecialType.System_Single => PredefinedType.Single, 55SpecialType.System_Double => PredefinedType.Double, 56SpecialType.System_String => PredefinedType.String, 57SpecialType.System_DateTime => PredefinedType.DateTime, 58SpecialType.System_IntPtr => PredefinedType.IntPtr, 59SpecialType.System_UIntPtr => PredefinedType.UIntPtr,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.cs (1)
198=> symbol.IsKind(SymbolKind.NamedType, out ITypeSymbol? typeSymbol) && typeSymbol.SpecialType == SpecialType.System_Object;
Microsoft.Analyzers.Extra (5)
CallAnalysis\Arrays.cs (2)
109|| keyType.SpecialType == SpecialType.System_Byte 110|| keyType.SpecialType == SpecialType.System_SByte)
CallAnalysis\StartsEndsWith.cs (1)
19var stringType = reg.Compilation.GetSpecialType(SpecialType.System_String);
CoalesceAnalyzer.cs (2)
37&& type.OriginalDefinition.SpecialType != SpecialType.System_Nullable_T) 64&& type.OriginalDefinition.SpecialType != SpecialType.System_Nullable_T)
Microsoft.Analyzers.Local (9)
ApiLifecycle\AssemblyAnalysis.cs (3)
148if (type.EnumUnderlyingType.SpecialType != SpecialType.System_Int32) 155if (baseType != null && baseType.SpecialType != SpecialType.System_Object && baseType.SpecialType != SpecialType.System_ValueType)
CallAnalysis\ToInvariantString.cs (6)
16private static readonly SpecialType[] _intTypes = new[] 18SpecialType.System_Byte, 19SpecialType.System_Int16, 20SpecialType.System_Int32, 21SpecialType.System_Int64, 28foreach (var type in _intTypes)
Microsoft.AspNetCore.App.Analyzers (14)
Http\HeaderDictionaryIndexerAnalyzer.cs (1)
30property.Parameters[0].Type.SpecialType == SpecialType.System_String &&
RouteEmbeddedLanguage\Infrastructure\MvcDetector.cs (1)
30var disposable = wellKnownTypes.Get(SpecialType.System_IDisposable);
RouteEmbeddedLanguage\Infrastructure\RouteUsageDetector.cs (2)
277var delegateSymbol = semanticModel.Compilation.GetSpecialType(SpecialType.System_Delegate); 290var stringSymbol = semanticModel.Compilation.GetSpecialType(SpecialType.System_String);
RouteHandlers\DisallowNonParsableComplexTypesOnParameters.cs (1)
132if (parameterTypeSymbol!.ConstructedFrom.SpecialType == SpecialType.System_Nullable_T &&
src\Shared\Roslyn\MvcFacts.cs (2)
73if (GetDeclaringType(method).SpecialType == SpecialType.System_Object) 136if (method.ExplicitInterfaceImplementations[i].ContainingType.SpecialType == SpecialType.System_IDisposable)
src\Shared\RoslynUtils\ParsabilityHelper.cs (5)
40if (typeSymbol.SpecialType == SpecialType.System_String) 98methodSymbol.ReturnType.SpecialType == SpecialType.System_Boolean && 100methodSymbol.Parameters[0].Type.SpecialType == SpecialType.System_String && 108methodSymbol.ReturnType.SpecialType == SpecialType.System_Boolean && 110methodSymbol.Parameters[0].Type.SpecialType == SpecialType.System_String &&
src\Shared\RoslynUtils\SymbolExtensions.cs (1)
34if (unwrapNullable && unwrappedTypeSymbol?.ConstructedFrom.SpecialType == SpecialType.System_Nullable_T)
src\Shared\RoslynUtils\WellKnownTypes.cs (1)
56public INamedTypeSymbol Get(SpecialType type)
Microsoft.AspNetCore.Components.Analyzers (2)
ComponentSymbols.cs (2)
40var @string = compilation.GetSpecialType(SpecialType.System_String); 41var @object = compilation.GetSpecialType(SpecialType.System_Object);
Microsoft.AspNetCore.Components.SdkAnalyzers (2)
ComponentSymbols.cs (2)
40var @string = compilation.GetSpecialType(SpecialType.System_String); 41var @object = compilation.GetSpecialType(SpecialType.System_Object);
Microsoft.AspNetCore.Http.RequestDelegateGenerator (25)
src\Shared\RoslynUtils\ParsabilityHelper.cs (5)
40if (typeSymbol.SpecialType == SpecialType.System_String) 98methodSymbol.ReturnType.SpecialType == SpecialType.System_Boolean && 100methodSymbol.Parameters[0].Type.SpecialType == SpecialType.System_String && 108methodSymbol.ReturnType.SpecialType == SpecialType.System_Boolean && 110methodSymbol.Parameters[0].Type.SpecialType == SpecialType.System_String &&
src\Shared\RoslynUtils\SymbolExtensions.cs (1)
34if (unwrapNullable && unwrappedTypeSymbol?.ConstructedFrom.SpecialType == SpecialType.System_Nullable_T)
src\Shared\RoslynUtils\WellKnownTypes.cs (1)
56public INamedTypeSymbol Get(SpecialType type)
StaticRouteHandlerModel\Emitters\EndpointParameterEmitter.cs (1)
235var fallback = endpointParameter.Type.SpecialType == SpecialType.System_String ? endpointParameter.DefaultValue : "null";
StaticRouteHandlerModel\Endpoint.cs (1)
92parameter is { IsArray: true, ElementType.SpecialType: SpecialType.System_String, Source: EndpointParameterSource.Query });
StaticRouteHandlerModel\EndpointParameter.cs (6)
226else if (Type.SpecialType == SpecialType.System_String) 230else if (IsArray && ElementType.SpecialType == SpecialType.System_String) 262|| Type.SpecialType == SpecialType.System_String 263|| (IsArray && ElementType.SpecialType == SpecialType.System_String) 354if (parameterType.SpecialType == SpecialType.System_Char) 358else if (parameterType.SpecialType == SpecialType.System_DateTime)
StaticRouteHandlerModel\EndpointResponse.cs (3)
76ResponseType.SpecialType != SpecialType.System_String && 77ResponseType.SpecialType != SpecialType.System_Object; 98return ResponseType!.SpecialType is SpecialType.System_String ? "text/plain; charset=utf-8" : "application/json";
StaticRouteHandlerModel\Model\EndpointParameterExtensions.cs (2)
44if (handlerParameterType is INamedTypeSymbol { IsGenericType: true, OriginalDefinition: { SpecialType: not SpecialType.System_Nullable_T } }) 58=> typeSymbol?.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T;
StaticRouteHandlerModel\StaticRouteHandlerModel.Emitter.cs (5)
123&& (responseType.SpecialType == SpecialType.System_Object || responseType.SpecialType == SpecialType.System_String)) 148else if (endpointResponse.ResponseType?.SpecialType == SpecialType.System_String) 152else if (endpointResponse.ResponseType?.SpecialType == SpecialType.System_Object) 214if (response.ResponseType?.SpecialType == SpecialType.System_String)
Microsoft.AspNetCore.Mvc.Analyzers (4)
src\Shared\Roslyn\MvcFacts.cs (2)
73if (GetDeclaringType(method).SpecialType == SpecialType.System_Object) 136if (method.ExplicitInterfaceImplementations[i].ContainingType.SpecialType == SpecialType.System_IDisposable)
TopLevelParameterNameAnalyzer.cs (2)
165namedArgumentValue.Type.SpecialType == SpecialType.System_String && 277var disposable = compilation.GetSpecialType(SpecialType.System_IDisposable);
Microsoft.AspNetCore.Mvc.Api.Analyzers (8)
AddResponseTypeAttributeCodeFixAction.cs (1)
156field.Type.SpecialType == SpecialType.System_Int32 &&
ApiControllerSymbolCache.cs (1)
97var disposable = compilation.GetSpecialType(SpecialType.System_IDisposable);
src\Shared\Roslyn\MvcFacts.cs (2)
73if (GetDeclaringType(method).SpecialType == SpecialType.System_Object) 136if (method.ExplicitInterfaceImplementations[i].ContainingType.SpecialType == SpecialType.System_IDisposable)
SymbolApiResponseMetadataProvider.cs (4)
195(namedArgumentValue.Type.SpecialType & SpecialType.System_Int32) == SpecialType.System_Int32 && 212(parameter.Type.SpecialType & SpecialType.System_Int32) == SpecialType.System_Int32)
Microsoft.CodeAnalysis (1801)
CodeGen\PermissionSetAttribute.cs (1)
86member => member.Kind == SymbolKind.Property && ((IPropertySymbol)member).Type.SpecialType == SpecialType.System_String));
CommandLine\SarifV2ErrorLogger.cs (1)
80string? justification = suppressionInfo?.Attribute?.DecodeNamedArgument<string>("Justification", SpecialType.System_String);
Compilation\Compilation.cs (4)
972public INamedTypeSymbol GetSpecialType(SpecialType specialType) 974if (specialType <= SpecialType.None || specialType > SpecialType.Count) 992private protected abstract INamedTypeSymbolInternal CommonGetSpecialType(SpecialType specialType);
Compilation\Expression.cs (13)
13case SpecialType.System_Int32: 15case SpecialType.System_Int64: 17case SpecialType.System_UInt32: 19case SpecialType.System_UInt64: 21case SpecialType.System_UInt16: 23case SpecialType.System_Int16: 25case SpecialType.System_SByte: 27case SpecialType.System_Byte: 29case SpecialType.System_Char: 31case SpecialType.System_Boolean: 33case SpecialType.System_Single: 35case SpecialType.System_Double: 37case SpecialType.System_Object:
ConstantValue.cs (41)
43internal abstract SpecialType SpecialType { get; } 355public static ConstantValue Create(object value, SpecialType st) 362public static ConstantValue CreateSizeOf(SpecialType st) 399public static ConstantValue Default(SpecialType st) 436internal static ConstantValueTypeDiscriminator GetDiscriminator(SpecialType st) 440case SpecialType.System_SByte: return ConstantValueTypeDiscriminator.SByte; 441case SpecialType.System_Byte: return ConstantValueTypeDiscriminator.Byte; 442case SpecialType.System_Int16: return ConstantValueTypeDiscriminator.Int16; 443case SpecialType.System_UInt16: return ConstantValueTypeDiscriminator.UInt16; 444case SpecialType.System_Int32: return ConstantValueTypeDiscriminator.Int32; 445case SpecialType.System_UInt32: return ConstantValueTypeDiscriminator.UInt32; 446case SpecialType.System_Int64: return ConstantValueTypeDiscriminator.Int64; 447case SpecialType.System_UInt64: return ConstantValueTypeDiscriminator.UInt64; 448case SpecialType.System_IntPtr: return ConstantValueTypeDiscriminator.NInt; 449case SpecialType.System_UIntPtr: return ConstantValueTypeDiscriminator.NUInt; 450case SpecialType.System_Char: return ConstantValueTypeDiscriminator.Char; 451case SpecialType.System_Boolean: return ConstantValueTypeDiscriminator.Boolean; 452case SpecialType.System_Single: return ConstantValueTypeDiscriminator.Single; 453case SpecialType.System_Double: return ConstantValueTypeDiscriminator.Double; 454case SpecialType.System_Decimal: return ConstantValueTypeDiscriminator.Decimal; 455case SpecialType.System_DateTime: return ConstantValueTypeDiscriminator.DateTime; 456case SpecialType.System_String: return ConstantValueTypeDiscriminator.String; 488private static SpecialType GetSpecialType(ConstantValueTypeDiscriminator discriminator) 492case ConstantValueTypeDiscriminator.SByte: return SpecialType.System_SByte; 493case ConstantValueTypeDiscriminator.Byte: return SpecialType.System_Byte; 494case ConstantValueTypeDiscriminator.Int16: return SpecialType.System_Int16; 495case ConstantValueTypeDiscriminator.UInt16: return SpecialType.System_UInt16; 496case ConstantValueTypeDiscriminator.Int32: return SpecialType.System_Int32; 497case ConstantValueTypeDiscriminator.UInt32: return SpecialType.System_UInt32; 498case ConstantValueTypeDiscriminator.Int64: return SpecialType.System_Int64; 499case ConstantValueTypeDiscriminator.UInt64: return SpecialType.System_UInt64; 500case ConstantValueTypeDiscriminator.NInt: return SpecialType.System_IntPtr; 501case ConstantValueTypeDiscriminator.NUInt: return SpecialType.System_UIntPtr; 502case ConstantValueTypeDiscriminator.Char: return SpecialType.System_Char; 503case ConstantValueTypeDiscriminator.Boolean: return SpecialType.System_Boolean; 504case ConstantValueTypeDiscriminator.Single: return SpecialType.System_Single; 505case ConstantValueTypeDiscriminator.Double: return SpecialType.System_Double; 506case ConstantValueTypeDiscriminator.Decimal: return SpecialType.System_Decimal; 507case ConstantValueTypeDiscriminator.DateTime: return SpecialType.System_DateTime; 508case ConstantValueTypeDiscriminator.String: return SpecialType.System_String; 509default: return SpecialType.None;
ConstantValueSpecialized.cs (11)
42internal override SpecialType SpecialType 44get { return SpecialType.None; } 83internal override SpecialType SpecialType 85get { return SpecialType.None; } 167internal override SpecialType SpecialType 169get { return SpecialType.System_String; } 246internal override SpecialType SpecialType 248get { return SpecialType.System_Decimal; } 287internal override SpecialType SpecialType 289get { return SpecialType.System_DateTime; } 330internal override SpecialType SpecialType
DiagnosticAnalyzer\SuppressMessageAttributeState.cs (3)
401info.Scope = attribute.DecodeNamedArgument<string>("Scope", SpecialType.System_String); 402info.Target = attribute.DecodeNamedArgument<string>("Target", SpecialType.System_String); 403info.MessageId = attribute.DecodeNamedArgument<string>("MessageId", SpecialType.System_String);
Emit\CommonPEModuleBuilder.cs (8)
695internal abstract Cci.INamedTypeReference GetSpecialType(SpecialType specialType, TSyntaxNode syntaxNodeOpt, DiagnosticBag diagnostics); 1127this.GetSpecialType(SpecialType.System_Object, syntaxNodeOpt, diagnostics), 1128this.GetSpecialType(SpecialType.System_ValueType, syntaxNodeOpt, diagnostics), 1129this.GetSpecialType(SpecialType.System_Byte, syntaxNodeOpt, diagnostics), 1130this.GetSpecialType(SpecialType.System_Int16, syntaxNodeOpt, diagnostics), 1131this.GetSpecialType(SpecialType.System_Int32, syntaxNodeOpt, diagnostics), 1132this.GetSpecialType(SpecialType.System_Int64, syntaxNodeOpt, diagnostics), 1175return GetSpecialType((SpecialType)platformType, (TSyntaxNode)context.SyntaxNode, context.Diagnostics);
ExtendedSpecialType.cs (9)
11/// A structure meant to represent a union of <see cref="SpecialType"/> and <see cref="InternalSpecialType"/> values 25public static implicit operator ExtendedSpecialType(SpecialType value) => new ExtendedSpecialType((int)value); 26public static explicit operator SpecialType(ExtendedSpecialType value) => value._value < (int)InternalSpecialType.First ? (SpecialType)value._value : SpecialType.None; 43case SpecialType other: 61if (_value > (int)SpecialType.None && _value <= (int)SpecialType.Count) 63return ((SpecialType)_value).ToString();
InternalSpecialType.cs (3)
11/// Unlike ids in <see cref="SpecialType"/> enum, these ids are not meant for public consumption 17Unknown = SpecialType.None, 28System_ReadOnlySpan_T = SpecialType.Count + 1,
MetadataReader\MetadataDecoder.cs (4)
1010if (type.SpecialType == SpecialType.System_Decimal) 1014else if (type.SpecialType == SpecialType.System_DateTime) 1033var specialType = typeCode.ToSpecialType(); 1355type = GetSpecialType(SpecialType.System_Object);
MetadataReader\MetadataTypeCodeExtensions.cs (54)
14internal static SpecialType ToSpecialType(this SignatureTypeCode typeCode) 19return SpecialType.System_TypedReference; 22return SpecialType.System_Void; 25return SpecialType.System_Boolean; 28return SpecialType.System_SByte; 31return SpecialType.System_Byte; 34return SpecialType.System_Int16; 37return SpecialType.System_UInt16; 40return SpecialType.System_Int32; 43return SpecialType.System_UInt32; 46return SpecialType.System_Int64; 49return SpecialType.System_UInt64; 52return SpecialType.System_Single; 55return SpecialType.System_Double; 58return SpecialType.System_Char; 61return SpecialType.System_String; 64return SpecialType.System_IntPtr; 67return SpecialType.System_UIntPtr; 70return SpecialType.System_Object; 77internal static bool HasShortFormSignatureEncoding(this SpecialType type) 105case SpecialType.System_String: 106case SpecialType.System_Object: 107case SpecialType.System_Void: 108case SpecialType.System_Boolean: 109case SpecialType.System_Char: 110case SpecialType.System_Byte: 111case SpecialType.System_SByte: 112case SpecialType.System_Int16: 113case SpecialType.System_UInt16: 114case SpecialType.System_Int32: 115case SpecialType.System_UInt32: 116case SpecialType.System_Int64: 117case SpecialType.System_UInt64: 118case SpecialType.System_IntPtr: 119case SpecialType.System_UIntPtr: 120case SpecialType.System_TypedReference: 121case SpecialType.System_Single: 122case SpecialType.System_Double: 129internal static SerializationTypeCode ToSerializationType(this SpecialType specialType) 141internal static SerializationTypeCode ToSerializationTypeOrInvalid(this SpecialType specialType) 145case SpecialType.System_Boolean: 148case SpecialType.System_SByte: 151case SpecialType.System_Byte: 154case SpecialType.System_Int16: 157case SpecialType.System_Int32: 160case SpecialType.System_Int64: 163case SpecialType.System_UInt16: 166case SpecialType.System_UInt32: 169case SpecialType.System_UInt64: 172case SpecialType.System_Single: 175case SpecialType.System_Double: 178case SpecialType.System_Char: 181case SpecialType.System_String: 184case SpecialType.System_Object:
MetadataReader\SymbolFactory.cs (1)
44internal abstract TypeSymbol GetSpecialType(ModuleSymbol moduleSymbol, SpecialType specialType);
MetadataReader\TypeNameDecoder.cs (1)
85protected TypeSymbol GetSpecialType(SpecialType specialType)
Operations\ControlFlowGraphBuilder.cs (21)
2411INamedTypeSymbol booleanType = _compilation.GetSpecialType(SpecialType.System_Boolean); 2469INamedTypeSymbol booleanType = _compilation.GetSpecialType(SpecialType.System_Boolean); 2570INamedTypeSymbol booleanType = _compilation.GetSpecialType(SpecialType.System_Boolean); 3129if (operation.Target?.Type?.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T && 3309return MakeIsNullOperation(operand, _compilation.GetSpecialType(SpecialType.System_Boolean)); 3963: _compilation.GetSpecialType(SpecialType.System_IDisposable); 4195return new AwaitOperation(invocation, semanticModel: null, value.Syntax, _compilation.GetSpecialType(SpecialType.System_Void), isImplicit: true); 4212Debug.Assert(iDisposable.SpecialType == SpecialType.System_IDisposable || 4273ITypeSymbol objectType = _compilation.GetSpecialType(SpecialType.System_Object); 4539: _compilation.GetSpecialType(SpecialType.System_IDisposable); 4622return new AwaitOperation(moveNext, semanticModel: null, operation.Syntax, _compilation.GetSpecialType(SpecialType.System_Boolean), isImplicit: true); 4629return MakeInvalidOperation(_compilation.GetSpecialType(SpecialType.System_Boolean), enumeratorRef); 4742ITypeSymbol booleanType = _compilation.GetSpecialType(SpecialType.System_Boolean); 5162_compilation.GetSpecialType(SpecialType.System_Boolean), 5243var shiftConst = new LiteralOperation(semanticModel: null, operand.Syntax, _compilation.GetSpecialType(SpecialType.System_Int32), 5345_compilation.GetSpecialType(SpecialType.System_Boolean), 5466INamedTypeSymbol booleanType = _compilation.GetSpecialType(SpecialType.System_Boolean); 5832ITypeSymbol booleanType = _compilation.GetSpecialType(SpecialType.System_Boolean); 6825Debug.Assert(outParameterArgument is { Parameter: { RefKind: RefKind.Out, Type.SpecialType: SpecialType.System_Boolean } }); 7740INamedTypeSymbol booleanType = _compilation.GetSpecialType(SpecialType.System_Boolean); 7795? MakeInvalidOperation(operation.Syntax, type: _compilation.GetSpecialType(SpecialType.System_Object), ImmutableArray<IOperation>.Empty)
PEWriter\Types.cs (6)
18SystemObject = CodeAnalysis.SpecialType.System_Object, 19SystemDecimal = CodeAnalysis.SpecialType.System_Decimal, 20SystemTypedReference = CodeAnalysis.SpecialType.System_TypedReference, 22SystemInt32 = CodeAnalysis.SpecialType.System_Int32, 23SystemVoid = CodeAnalysis.SpecialType.System_Void, 24SystemString = CodeAnalysis.SpecialType.System_String,
SpecialMembers.cs (470)
21(byte)SpecialType.System_String, // DeclaringTypeId 24(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 25(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Char, 29(byte)SpecialType.System_String, // DeclaringTypeId 32(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 33(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 34(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 38(byte)SpecialType.System_String, // DeclaringTypeId 41(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 42(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 43(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 44(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 48(byte)SpecialType.System_String, // DeclaringTypeId 51(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 52(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 53(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 54(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 55(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 59(byte)SpecialType.System_String, // DeclaringTypeId 62(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 63(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 67(byte)SpecialType.System_String, // DeclaringTypeId 70(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 71(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 75(byte)SpecialType.System_String, // DeclaringTypeId 78(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 79(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 80(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 84(byte)SpecialType.System_String, // DeclaringTypeId 87(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 88(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 89(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 90(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 94(byte)SpecialType.System_String, // DeclaringTypeId 97(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 98(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 102(byte)SpecialType.System_String, // DeclaringTypeId 105(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 108(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Char, 111(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Char, 115(byte)SpecialType.System_String, // DeclaringTypeId 118(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 121(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Char, 124(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Char, 127(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Char, 131(byte)SpecialType.System_String, // DeclaringTypeId 134(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 137(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Char, 140(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Char, 143(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Char, 146(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Char, 150(byte)SpecialType.System_String, // DeclaringTypeId 153(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 154(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 155(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 159(byte)SpecialType.System_String, // DeclaringTypeId 162(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 163(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 164(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 168(byte)SpecialType.System_String, // DeclaringTypeId 171(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 175(byte)SpecialType.System_String, // DeclaringTypeId 178(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Char, 179(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 183(byte)SpecialType.System_String, // DeclaringTypeId 186(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 187(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 188(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 192(byte)SpecialType.System_String, // DeclaringTypeId 195(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Return Type 197(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 198(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 202(byte)SpecialType.System_String, // DeclaringTypeId 205(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Return Type 206(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 207(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 211(byte)SpecialType.System_String, // DeclaringTypeId 216(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Char, 217(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 221(byte)SpecialType.System_Double, // DeclaringTypeId 224(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 225(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, 229(byte)SpecialType.System_Single, // DeclaringTypeId 232(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 233(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Single, 237(byte)SpecialType.System_Delegate, // DeclaringTypeId 240(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Delegate, 241(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Delegate, 242(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Delegate, 246(byte)SpecialType.System_Delegate, // DeclaringTypeId 249(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Delegate, 250(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Delegate, 251(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Delegate, 255(byte)SpecialType.System_Delegate, // DeclaringTypeId 258(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 259(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Delegate, 260(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Delegate, 264(byte)SpecialType.System_Delegate, // DeclaringTypeId 267(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 268(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Delegate, 269(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Delegate, 273(byte)SpecialType.System_Delegate, // DeclaringTypeId 276(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Delegate, // Return Type 278(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 283(byte)SpecialType.System_Delegate, // DeclaringTypeId 286(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Delegate, // Return Type 288(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 290(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 294(byte)SpecialType.System_Decimal, // DeclaringTypeId 296(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, // Field Signature 300(byte)SpecialType.System_Decimal, // DeclaringTypeId 302(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, // Field Signature 306(byte)SpecialType.System_Decimal, // DeclaringTypeId 308(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, // Field Signature 312(byte)SpecialType.System_Decimal, // DeclaringTypeId 315(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 316(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 320(byte)SpecialType.System_Decimal, // DeclaringTypeId 323(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 324(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt32, 328(byte)SpecialType.System_Decimal, // DeclaringTypeId 331(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 332(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int64, 336(byte)SpecialType.System_Decimal, // DeclaringTypeId 339(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 340(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt64, 344(byte)SpecialType.System_Decimal, // DeclaringTypeId 347(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 348(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Single, 352(byte)SpecialType.System_Decimal, // DeclaringTypeId 355(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 356(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, 360(byte)SpecialType.System_Decimal, // DeclaringTypeId 363(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 364(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 365(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 366(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 367(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 368(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Byte, 372(byte)SpecialType.System_Decimal, // DeclaringTypeId 375(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 376(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 377(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 381(byte)SpecialType.System_Decimal, // DeclaringTypeId 384(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 385(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 386(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 390(byte)SpecialType.System_Decimal, // DeclaringTypeId 393(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 394(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 395(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 399(byte)SpecialType.System_Decimal, // DeclaringTypeId 402(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 403(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 404(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 408(byte)SpecialType.System_Decimal, // DeclaringTypeId 411(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 412(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 413(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 417(byte)SpecialType.System_Decimal, // DeclaringTypeId 420(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 421(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 425(byte)SpecialType.System_Decimal, // DeclaringTypeId 428(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 429(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 433(byte)SpecialType.System_Decimal, // DeclaringTypeId 436(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 437(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 441(byte)SpecialType.System_Decimal, // DeclaringTypeId 444(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 445(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 449(byte)SpecialType.System_Decimal, // DeclaringTypeId 452(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 453(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 454(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 458(byte)SpecialType.System_Decimal, // DeclaringTypeId 461(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 462(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 463(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 467(byte)SpecialType.System_Decimal, // DeclaringTypeId 470(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 471(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 472(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 476(byte)SpecialType.System_Decimal, // DeclaringTypeId 479(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 480(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 481(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 485(byte)SpecialType.System_Decimal, // DeclaringTypeId 488(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 489(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 490(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 494(byte)SpecialType.System_Decimal, // DeclaringTypeId 497(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 498(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 499(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 503(byte)SpecialType.System_Decimal, // DeclaringTypeId 506(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 507(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 508(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 512(byte)SpecialType.System_Decimal, // DeclaringTypeId 515(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 516(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 517(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 521(byte)SpecialType.System_Decimal, // DeclaringTypeId 524(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 525(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 526(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 530(byte)SpecialType.System_Decimal, // DeclaringTypeId 533(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 534(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 535(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 539(byte)SpecialType.System_Decimal, // DeclaringTypeId 542(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 543(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 544(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 548(byte)SpecialType.System_Decimal, // DeclaringTypeId 551(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 552(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 553(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 557(byte)SpecialType.System_Decimal, // DeclaringTypeId 560(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 561(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 562(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 566(byte)SpecialType.System_Decimal, // DeclaringTypeId 569(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 570(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Byte, 574(byte)SpecialType.System_Decimal, // DeclaringTypeId 577(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 578(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Char, 582(byte)SpecialType.System_Decimal, // DeclaringTypeId 585(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 586(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int16, 590(byte)SpecialType.System_Decimal, // DeclaringTypeId 593(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 594(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 598(byte)SpecialType.System_Decimal, // DeclaringTypeId 601(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 602(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int64, 606(byte)SpecialType.System_Decimal, // DeclaringTypeId 609(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 610(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_SByte, 614(byte)SpecialType.System_Decimal, // DeclaringTypeId 617(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 618(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt16, 622(byte)SpecialType.System_Decimal, // DeclaringTypeId 625(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 626(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt32, 630(byte)SpecialType.System_Decimal, // DeclaringTypeId 633(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 634(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt64, 638(byte)SpecialType.System_Decimal, // DeclaringTypeId 641(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Byte, 642(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 646(byte)SpecialType.System_Decimal, // DeclaringTypeId 649(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt16, 650(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 654(byte)SpecialType.System_Decimal, // DeclaringTypeId 657(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_SByte, 658(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 662(byte)SpecialType.System_Decimal, // DeclaringTypeId 665(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int16, 666(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 670(byte)SpecialType.System_Decimal, // DeclaringTypeId 673(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Single, 674(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 678(byte)SpecialType.System_Decimal, // DeclaringTypeId 681(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, 682(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 686(byte)SpecialType.System_Decimal, // DeclaringTypeId 689(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Char, 690(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 694(byte)SpecialType.System_Decimal, // DeclaringTypeId 697(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt64, 698(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 702(byte)SpecialType.System_Decimal, // DeclaringTypeId 705(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 706(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 710(byte)SpecialType.System_Decimal, // DeclaringTypeId 713(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt32, 714(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 718(byte)SpecialType.System_Decimal, // DeclaringTypeId 721(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int64, 722(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 726(byte)SpecialType.System_Decimal, // DeclaringTypeId 729(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 730(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, 734(byte)SpecialType.System_Decimal, // DeclaringTypeId 737(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 738(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Single, 742(byte)SpecialType.System_DateTime, // DeclaringTypeId 744(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_DateTime, // Field Signature 748(byte)SpecialType.System_DateTime, // DeclaringTypeId 751(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 752(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int64, 756(byte)SpecialType.System_DateTime, // DeclaringTypeId 759(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 760(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_DateTime, 761(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_DateTime, 765(byte)SpecialType.System_DateTime, // DeclaringTypeId 768(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 769(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_DateTime, 770(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_DateTime, 774(byte)SpecialType.System_DateTime, // DeclaringTypeId 777(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 778(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_DateTime, 779(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_DateTime, 783(byte)SpecialType.System_DateTime, // DeclaringTypeId 786(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 787(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_DateTime, 788(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_DateTime, 792(byte)SpecialType.System_DateTime, // DeclaringTypeId 795(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 796(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_DateTime, 797(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_DateTime, 801(byte)SpecialType.System_DateTime, // DeclaringTypeId 804(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 805(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_DateTime, 806(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_DateTime, 810(byte)SpecialType.System_DateTime, // DeclaringTypeId 813(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 814(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_DateTime, 815(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_DateTime, 819(byte)SpecialType.System_Collections_IEnumerable, // DeclaringTypeId 822(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Collections_IEnumerator, 826(byte)SpecialType.System_Collections_IEnumerator, // DeclaringTypeId 829(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 833(byte)SpecialType.System_Collections_IEnumerator, // DeclaringTypeId 836(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 840(byte)SpecialType.System_Collections_IEnumerator, // DeclaringTypeId 843(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 847(byte)SpecialType.System_Collections_IEnumerator, // DeclaringTypeId 850(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 854(byte)SpecialType.System_Collections_Generic_IEnumerable_T, // DeclaringTypeId 858(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Collections_Generic_IEnumerator_T, 864(byte)SpecialType.System_Collections_Generic_IEnumerator_T, // DeclaringTypeId 871(byte)SpecialType.System_Collections_Generic_IEnumerator_T, // DeclaringTypeId 878(byte)SpecialType.System_IDisposable, // DeclaringTypeId 881(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 885(byte)SpecialType.System_Array, // DeclaringTypeId 888(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 892(byte)SpecialType.System_Array, // DeclaringTypeId 895(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int64, 899(byte)SpecialType.System_Array, // DeclaringTypeId 902(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 903(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 907(byte)SpecialType.System_Array, // DeclaringTypeId 910(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 911(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 915(byte)SpecialType.System_Object, // DeclaringTypeId 918(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 922(byte)SpecialType.System_Object, // DeclaringTypeId 925(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 926(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 930(byte)SpecialType.System_Object, // DeclaringTypeId 933(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 934(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 935(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 939(byte)SpecialType.System_Object, // DeclaringTypeId 942(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 946(byte)SpecialType.System_Object, // DeclaringTypeId 949(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 950(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 951(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 955(byte)SpecialType.System_IntPtr, // DeclaringTypeId 958(byte)SignatureTypeCode.Pointer, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 959(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_IntPtr, 963(byte)SpecialType.System_IntPtr, // DeclaringTypeId 966(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 967(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_IntPtr, 971(byte)SpecialType.System_IntPtr, // DeclaringTypeId 974(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int64, 975(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_IntPtr, 979(byte)SpecialType.System_IntPtr, // DeclaringTypeId 982(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_IntPtr, 983(byte)SignatureTypeCode.Pointer, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 987(byte)SpecialType.System_IntPtr, // DeclaringTypeId 990(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_IntPtr, 991(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 995(byte)SpecialType.System_IntPtr, // DeclaringTypeId 998(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_IntPtr, 999(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int64, 1003(byte)SpecialType.System_UIntPtr, // DeclaringTypeId 1006(byte)SignatureTypeCode.Pointer, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 1007(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UIntPtr, 1011(byte)SpecialType.System_UIntPtr, // DeclaringTypeId 1014(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt32, 1015(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UIntPtr, 1019(byte)SpecialType.System_UIntPtr, // DeclaringTypeId 1022(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt64, 1023(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UIntPtr, 1027(byte)SpecialType.System_UIntPtr, // DeclaringTypeId 1030(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UIntPtr, 1031(byte)SignatureTypeCode.Pointer, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 1035(byte)SpecialType.System_UIntPtr, // DeclaringTypeId 1038(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UIntPtr, 1039(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt32, 1043(byte)SpecialType.System_UIntPtr, // DeclaringTypeId 1046(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UIntPtr, 1047(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt64, 1051(byte)SpecialType.System_Nullable_T, // DeclaringTypeId 1058(byte)SpecialType.System_Nullable_T, // DeclaringTypeId 1066(byte)SpecialType.System_Nullable_T, // DeclaringTypeId 1073(byte)SpecialType.System_Nullable_T, // DeclaringTypeId 1076(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 1080(byte)SpecialType.System_Nullable_T, // DeclaringTypeId 1083(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 1088(byte)SpecialType.System_Nullable_T, // DeclaringTypeId 1091(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Nullable_T, 1096(byte)SpecialType.System_Nullable_T, // DeclaringTypeId 1100(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Nullable_T, 1104(byte)SpecialType.System_Runtime_CompilerServices_RuntimeFeature, // DeclaringTypeId 1106(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Field Signature 1110(byte)SpecialType.System_Runtime_CompilerServices_RuntimeFeature, // DeclaringTypeId 1112(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Field Signature 1116(byte)SpecialType.System_Runtime_CompilerServices_RuntimeFeature, // DeclaringTypeId 1118(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Field Signature 1122(byte)SpecialType.System_Runtime_CompilerServices_RuntimeFeature, // DeclaringTypeId 1124(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Field Signature 1128(byte)SpecialType.System_Runtime_CompilerServices_RuntimeFeature, // DeclaringTypeId 1130(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Field Signature 1134(byte)SpecialType.System_Runtime_CompilerServices_RuntimeFeature, // DeclaringTypeId 1136(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Field Signature 1140(byte)SpecialType.System_Runtime_CompilerServices_RuntimeFeature, // DeclaringTypeId 1142(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Field Signature 1146(byte)SpecialType.System_Runtime_CompilerServices_PreserveBaseOverridesAttribute, // DeclaringTypeId 1149(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 1153(byte)SpecialType.System_Runtime_CompilerServices_InlineArrayAttribute, // DeclaringTypeId 1156(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 1157(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 1164(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 1169(byte)SpecialType.System_Collections_Generic_IReadOnlyCollection_T, // DeclaringTypeId 1172(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Return Type 1176(byte)SpecialType.System_Collections_Generic_IReadOnlyList_T, // DeclaringTypeId 1180(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 1184(byte)SpecialType.System_Collections_Generic_ICollection_T, // DeclaringTypeId 1187(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Return Type 1191(byte)SpecialType.System_Collections_Generic_ICollection_T, // DeclaringTypeId 1194(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 1198(byte)SpecialType.System_Collections_Generic_ICollection_T, // DeclaringTypeId 1201(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 1206(byte)SpecialType.System_Collections_Generic_ICollection_T, // DeclaringTypeId 1209(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 1213(byte)SpecialType.System_Collections_Generic_ICollection_T, // DeclaringTypeId 1216(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 1221(byte)SpecialType.System_Collections_Generic_ICollection_T, // DeclaringTypeId 1224(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 1226(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 1230(byte)SpecialType.System_Collections_Generic_ICollection_T, // DeclaringTypeId 1233(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 1238(byte)SpecialType.System_Collections_Generic_IList_T, // DeclaringTypeId 1242(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 1246(byte)SpecialType.System_Collections_Generic_IList_T, // DeclaringTypeId 1249(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Return Type 1254(byte)SpecialType.System_Collections_Generic_IList_T, // DeclaringTypeId 1257(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 1258(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 1263(byte)SpecialType.System_Collections_Generic_IList_T, // DeclaringTypeId 1266(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 1267(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 1275(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_RuntimeMethodHandle, 1283(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_RuntimeMethodHandle, 1284(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_RuntimeTypeHandle, 1288(byte)SpecialType.System_Array, // DeclaringTypeId 1291(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Return Type 1295(byte)SpecialType.System_Array, // DeclaringTypeId 1302(byte)SpecialType.System_Array, // DeclaringTypeId 1305(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 1306(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1307(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 1315(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_RuntimeTypeHandle,
SpecialTypeExtensions.cs (154)
17public static bool IsClrInteger(this SpecialType specialType) 21case SpecialType.System_Boolean: 22case SpecialType.System_Char: 23case SpecialType.System_Byte: 24case SpecialType.System_SByte: 25case SpecialType.System_Int16: 26case SpecialType.System_UInt16: 27case SpecialType.System_Int32: 28case SpecialType.System_UInt32: 29case SpecialType.System_Int64: 30case SpecialType.System_UInt64: 31case SpecialType.System_IntPtr: 32case SpecialType.System_UIntPtr: 42public static bool IsBlittable(this SpecialType specialType) 46case SpecialType.System_Boolean: 47case SpecialType.System_Char: 48case SpecialType.System_Byte: 49case SpecialType.System_SByte: 50case SpecialType.System_Int16: 51case SpecialType.System_UInt16: 52case SpecialType.System_Int32: 53case SpecialType.System_UInt32: 54case SpecialType.System_Int64: 55case SpecialType.System_UInt64: 56case SpecialType.System_Single: 57case SpecialType.System_Double: 64public static bool IsValueType(this SpecialType specialType) 68case SpecialType.System_Void: 69case SpecialType.System_Boolean: 70case SpecialType.System_Char: 71case SpecialType.System_Byte: 72case SpecialType.System_SByte: 73case SpecialType.System_Int16: 74case SpecialType.System_UInt16: 75case SpecialType.System_Int32: 76case SpecialType.System_UInt32: 77case SpecialType.System_Int64: 78case SpecialType.System_UInt64: 79case SpecialType.System_Single: 80case SpecialType.System_Double: 81case SpecialType.System_Decimal: 82case SpecialType.System_IntPtr: 83case SpecialType.System_UIntPtr: 84case SpecialType.System_Nullable_T: 85case SpecialType.System_DateTime: 86case SpecialType.System_TypedReference: 87case SpecialType.System_ArgIterator: 88case SpecialType.System_RuntimeArgumentHandle: 89case SpecialType.System_RuntimeFieldHandle: 90case SpecialType.System_RuntimeMethodHandle: 91case SpecialType.System_RuntimeTypeHandle: 98public static int SizeInBytes(this SpecialType specialType) 102case SpecialType.System_SByte: 104case SpecialType.System_Byte: 106case SpecialType.System_Int16: 108case SpecialType.System_UInt16: 110case SpecialType.System_Int32: 112case SpecialType.System_UInt32: 114case SpecialType.System_Int64: 116case SpecialType.System_UInt64: 118case SpecialType.System_Char: 120case SpecialType.System_Single: 122case SpecialType.System_Double: 124case SpecialType.System_Boolean: 127case SpecialType.System_Decimal: 141public static bool IsPrimitiveRecursiveStruct(this SpecialType specialType) 145case SpecialType.System_Boolean: 146case SpecialType.System_Byte: 147case SpecialType.System_Char: 148case SpecialType.System_Double: 149case SpecialType.System_Int16: 150case SpecialType.System_Int32: 151case SpecialType.System_Int64: 152case SpecialType.System_UInt16: 153case SpecialType.System_UInt32: 154case SpecialType.System_UInt64: 155case SpecialType.System_IntPtr: 156case SpecialType.System_UIntPtr: 157case SpecialType.System_SByte: 158case SpecialType.System_Single: 165public static bool IsValidEnumUnderlyingType(this SpecialType specialType) 169case SpecialType.System_Byte: 170case SpecialType.System_SByte: 171case SpecialType.System_Int16: 172case SpecialType.System_UInt16: 173case SpecialType.System_Int32: 174case SpecialType.System_UInt32: 175case SpecialType.System_Int64: 176case SpecialType.System_UInt64: 183public static bool IsNumericType(this SpecialType specialType) 187case SpecialType.System_Byte: 188case SpecialType.System_SByte: 189case SpecialType.System_Int16: 190case SpecialType.System_UInt16: 191case SpecialType.System_Int32: 192case SpecialType.System_UInt32: 193case SpecialType.System_Int64: 194case SpecialType.System_UInt64: 195case SpecialType.System_Single: 196case SpecialType.System_Double: 197case SpecialType.System_Decimal: 207public static bool IsIntegralType(this SpecialType specialType) 211case SpecialType.System_Byte: 212case SpecialType.System_SByte: 213case SpecialType.System_Int16: 214case SpecialType.System_UInt16: 215case SpecialType.System_Int32: 216case SpecialType.System_UInt32: 217case SpecialType.System_Int64: 218case SpecialType.System_UInt64: 225public static bool IsUnsignedIntegralType(this SpecialType specialType) 229case SpecialType.System_Byte: 230case SpecialType.System_UInt16: 231case SpecialType.System_UInt32: 232case SpecialType.System_UInt64: 239public static bool IsSignedIntegralType(this SpecialType specialType) 243case SpecialType.System_SByte: 244case SpecialType.System_Int16: 245case SpecialType.System_Int32: 246case SpecialType.System_Int64: 258public static int VBForToShiftBits(this SpecialType specialType) 262case SpecialType.System_SByte: 264case SpecialType.System_Int16: 266case SpecialType.System_Int32: 268case SpecialType.System_Int64: 275public static SpecialType FromRuntimeTypeOfLiteralValue(object value) 282return SpecialType.System_Int32; 287return SpecialType.System_String; 292return SpecialType.System_Boolean; 297return SpecialType.System_Char; 302return SpecialType.System_Int64; 307return SpecialType.System_Double; 312return SpecialType.System_UInt32; 317return SpecialType.System_UInt64; 322return SpecialType.System_Single; 327return SpecialType.System_Decimal; 332return SpecialType.System_Int16; 337return SpecialType.System_UInt16; 342return SpecialType.System_DateTime; 347return SpecialType.System_Byte; 352return SpecialType.System_SByte; 355return SpecialType.None; 365public static bool CanOptimizeBehavior(this SpecialType specialType) 366=> specialType is >= SpecialType.System_Object and <= SpecialType.System_Runtime_CompilerServices_InlineArrayAttribute; 371internal static ulong ConvertUnderlyingValueToUInt64(this SpecialType enumUnderlyingType, object value) 379SpecialType.System_SByte => (ulong)(sbyte)value, 380SpecialType.System_Int16 => (ulong)(short)value, 381SpecialType.System_Int32 => (ulong)(int)value, 382SpecialType.System_Int64 => (ulong)(long)value, 383SpecialType.System_Byte => (byte)value, 384SpecialType.System_UInt16 => (ushort)value, 385SpecialType.System_UInt32 => (uint)value, 386SpecialType.System_UInt64 => (ulong)value,
SpecialTypes.cs (38)
83private static readonly SpecialType[] s_typeCodeToTypeIdMap; 99s_typeIdToTypeCodeMap = new Microsoft.Cci.PrimitiveTypeCode[(int)SpecialType.Count + 1]; 106s_typeIdToTypeCodeMap[(int)SpecialType.System_Boolean] = Microsoft.Cci.PrimitiveTypeCode.Boolean; 107s_typeIdToTypeCodeMap[(int)SpecialType.System_Char] = Microsoft.Cci.PrimitiveTypeCode.Char; 108s_typeIdToTypeCodeMap[(int)SpecialType.System_Void] = Microsoft.Cci.PrimitiveTypeCode.Void; 109s_typeIdToTypeCodeMap[(int)SpecialType.System_String] = Microsoft.Cci.PrimitiveTypeCode.String; 110s_typeIdToTypeCodeMap[(int)SpecialType.System_Int64] = Microsoft.Cci.PrimitiveTypeCode.Int64; 111s_typeIdToTypeCodeMap[(int)SpecialType.System_Int32] = Microsoft.Cci.PrimitiveTypeCode.Int32; 112s_typeIdToTypeCodeMap[(int)SpecialType.System_Int16] = Microsoft.Cci.PrimitiveTypeCode.Int16; 113s_typeIdToTypeCodeMap[(int)SpecialType.System_SByte] = Microsoft.Cci.PrimitiveTypeCode.Int8; 114s_typeIdToTypeCodeMap[(int)SpecialType.System_UInt64] = Microsoft.Cci.PrimitiveTypeCode.UInt64; 115s_typeIdToTypeCodeMap[(int)SpecialType.System_UInt32] = Microsoft.Cci.PrimitiveTypeCode.UInt32; 116s_typeIdToTypeCodeMap[(int)SpecialType.System_UInt16] = Microsoft.Cci.PrimitiveTypeCode.UInt16; 117s_typeIdToTypeCodeMap[(int)SpecialType.System_Byte] = Microsoft.Cci.PrimitiveTypeCode.UInt8; 118s_typeIdToTypeCodeMap[(int)SpecialType.System_Single] = Microsoft.Cci.PrimitiveTypeCode.Float32; 119s_typeIdToTypeCodeMap[(int)SpecialType.System_Double] = Microsoft.Cci.PrimitiveTypeCode.Float64; 120s_typeIdToTypeCodeMap[(int)SpecialType.System_IntPtr] = Microsoft.Cci.PrimitiveTypeCode.IntPtr; 121s_typeIdToTypeCodeMap[(int)SpecialType.System_UIntPtr] = Microsoft.Cci.PrimitiveTypeCode.UIntPtr; 123s_typeCodeToTypeIdMap = new SpecialType[(int)Microsoft.Cci.PrimitiveTypeCode.Invalid + 1]; 127s_typeCodeToTypeIdMap[i] = SpecialType.None; 130s_typeCodeToTypeIdMap[(int)Microsoft.Cci.PrimitiveTypeCode.Boolean] = SpecialType.System_Boolean; 131s_typeCodeToTypeIdMap[(int)Microsoft.Cci.PrimitiveTypeCode.Char] = SpecialType.System_Char; 132s_typeCodeToTypeIdMap[(int)Microsoft.Cci.PrimitiveTypeCode.Void] = SpecialType.System_Void; 133s_typeCodeToTypeIdMap[(int)Microsoft.Cci.PrimitiveTypeCode.String] = SpecialType.System_String; 134s_typeCodeToTypeIdMap[(int)Microsoft.Cci.PrimitiveTypeCode.Int64] = SpecialType.System_Int64; 135s_typeCodeToTypeIdMap[(int)Microsoft.Cci.PrimitiveTypeCode.Int32] = SpecialType.System_Int32; 136s_typeCodeToTypeIdMap[(int)Microsoft.Cci.PrimitiveTypeCode.Int16] = SpecialType.System_Int16; 137s_typeCodeToTypeIdMap[(int)Microsoft.Cci.PrimitiveTypeCode.Int8] = SpecialType.System_SByte; 138s_typeCodeToTypeIdMap[(int)Microsoft.Cci.PrimitiveTypeCode.UInt64] = SpecialType.System_UInt64; 139s_typeCodeToTypeIdMap[(int)Microsoft.Cci.PrimitiveTypeCode.UInt32] = SpecialType.System_UInt32; 140s_typeCodeToTypeIdMap[(int)Microsoft.Cci.PrimitiveTypeCode.UInt16] = SpecialType.System_UInt16; 141s_typeCodeToTypeIdMap[(int)Microsoft.Cci.PrimitiveTypeCode.UInt8] = SpecialType.System_Byte; 142s_typeCodeToTypeIdMap[(int)Microsoft.Cci.PrimitiveTypeCode.Float32] = SpecialType.System_Single; 143s_typeCodeToTypeIdMap[(int)Microsoft.Cci.PrimitiveTypeCode.Float64] = SpecialType.System_Double; 144s_typeCodeToTypeIdMap[(int)Microsoft.Cci.PrimitiveTypeCode.IntPtr] = SpecialType.System_IntPtr; 145s_typeCodeToTypeIdMap[(int)Microsoft.Cci.PrimitiveTypeCode.UIntPtr] = SpecialType.System_UIntPtr; 168public static SpecialType GetTypeFromMetadataName(Microsoft.Cci.PrimitiveTypeCode typeCode) 173public static Microsoft.Cci.PrimitiveTypeCode GetTypeCode(SpecialType typeId)
SymbolDisplay\AbstractSymbolDisplayVisitor.cs (5)
124protected abstract void AddLiteralValue(SpecialType type, object value); 125protected abstract void AddExplicitlyCastedLiteralValue(INamedTypeSymbol namedType, SpecialType type, object value); 237var underlyingSpecialType = enumType.EnumUnderlyingType.SpecialType; 316var underlyingSpecialType = enumType.EnumUnderlyingType.SpecialType; 336var underlyingSpecialType = enumType.EnumUnderlyingType.SpecialType;
Symbols\Attributes\CommonAttributeData.cs (31)
147internal T? GetConstructorArgument<T>(int i, SpecialType specialType) 165internal T? DecodeNamedArgument<T>(string name, SpecialType specialType, T? defaultValue = default) 170private static T? DecodeNamedArgument<T>(ImmutableArray<KeyValuePair<string, TypedConstant>> namedArguments, string name, SpecialType specialType, T? defaultValue = default) 208Debug.Assert(parameters[0].Type.SpecialType == SpecialType.System_Byte); 209Debug.Assert(parameters[1].Type.SpecialType == SpecialType.System_Byte); 213byte scale = args[0].DecodeValue<byte>(SpecialType.System_Byte); 214bool isNegative = args[1].DecodeValue<byte>(SpecialType.System_Byte) != 0; 216if (parameters[2].Type.SpecialType == SpecialType.System_Int32) 218Debug.Assert(parameters[2].Type.SpecialType == SpecialType.System_Int32); 219Debug.Assert(parameters[3].Type.SpecialType == SpecialType.System_Int32); 220Debug.Assert(parameters[4].Type.SpecialType == SpecialType.System_Int32); 222high = args[2].DecodeValue<int>(SpecialType.System_Int32); 223mid = args[3].DecodeValue<int>(SpecialType.System_Int32); 224low = args[4].DecodeValue<int>(SpecialType.System_Int32); 228Debug.Assert(parameters[2].Type.SpecialType == SpecialType.System_UInt32); 229Debug.Assert(parameters[3].Type.SpecialType == SpecialType.System_UInt32); 230Debug.Assert(parameters[4].Type.SpecialType == SpecialType.System_UInt32); 232high = unchecked((int)args[2].DecodeValue<uint>(SpecialType.System_UInt32)); 233mid = unchecked((int)args[3].DecodeValue<uint>(SpecialType.System_UInt32)); 234low = unchecked((int)args[4].DecodeValue<uint>(SpecialType.System_UInt32)); 242long value = this.CommonConstructorArguments[0].DecodeValue<long>(SpecialType.System_Int64); 413if (attribute.AttributeConstructor.Parameters[0].Type.SpecialType == SpecialType.System_Int16) 415options = (MethodImplOptions)attribute.CommonConstructorArguments[0].DecodeValue<short>(SpecialType.System_Int16); 419options = attribute.CommonConstructorArguments[0].DecodeValue<MethodImplOptions>(SpecialType.System_Enum); 440var value = (MethodImplAttributes)namedArg.Value.DecodeValue<int>(SpecialType.System_Enum); 477LayoutKind kind = attribute.CommonConstructorArguments[0].DecodeValue<LayoutKind>(SpecialType.System_Enum); 497charSet = namedArg.Value.DecodeValue<CharSet>(SpecialType.System_Enum); 518alignment = namedArg.Value.DecodeValue<int>(SpecialType.System_Int32); 530size = namedArg.Value.DecodeValue<int>(Microsoft.CodeAnalysis.SpecialType.System_Int32); 580bool allowMultiple = DecodeNamedArgument(namedArgs, "AllowMultiple", SpecialType.System_Boolean, false); 581bool inherited = DecodeNamedArgument(namedArgs, "Inherited", SpecialType.System_Boolean, true);
Symbols\Attributes\MarshalAsAttributeDecoder.cs (13)
102if (attribute.AttributeConstructor.Parameters[0].Type.SpecialType == SpecialType.System_Int16) 104unmanagedType = (UnmanagedType)attribute.CommonConstructorArguments[0].DecodeValue<short>(SpecialType.System_Int16); 108unmanagedType = attribute.CommonConstructorArguments[0].DecodeValue<UnmanagedType>(SpecialType.System_Enum); 131typeName = namedArg.Value.DecodeValue<string>(SpecialType.System_String); 142typeSymbol = namedArg.Value.DecodeValue<ITypeSymbolInternal>(SpecialType.None); 147cookie = namedArg.Value.DecodeValue<string>(SpecialType.System_String); 187parameterIndex = namedArg.Value.DecodeValue<int>(SpecialType.System_Int32); 223elementType = namedArg.Value.DecodeValue<UnmanagedType>(SpecialType.System_Enum); 237elementCount = namedArg.Value.DecodeValue<int>(SpecialType.System_Int32); 252parameterIndex = namedArg.Value.DecodeValue<short>(SpecialType.System_Int16); 311elementTypeVariant = namedArg.Value.DecodeValue<Cci.VarEnum>(SpecialType.System_Enum); 321elementTypeSymbol = namedArg.Value.DecodeValue<ITypeSymbolInternal>(SpecialType.None); 379elementCount = namedArg.Value.DecodeValue<int>(SpecialType.System_Int32);
Symbols\INamedTypeSymbolInternal.cs (20)
45case SpecialType.System_Void: 46case SpecialType.System_Boolean: 47case SpecialType.System_Char: 48case SpecialType.System_SByte: 49case SpecialType.System_Byte: 50case SpecialType.System_Int16: 51case SpecialType.System_UInt16: 52case SpecialType.System_Int32: 53case SpecialType.System_UInt32: 54case SpecialType.System_Int64: 55case SpecialType.System_UInt64: 56case SpecialType.System_Decimal: 57case SpecialType.System_Single: 58case SpecialType.System_Double: 59case SpecialType.System_IntPtr: 60case SpecialType.System_UIntPtr: 61case SpecialType.System_ArgIterator: 62case SpecialType.System_RuntimeArgumentHandle: 64case SpecialType.System_TypedReference: 66case SpecialType.None:
Symbols\ITypeSymbol.cs (5)
104/// Returns <see cref="Microsoft.CodeAnalysis.SpecialType.None"/> if the type is not special. 106SpecialType SpecialType { get; } 216return typeOpt?.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T; 232return type?.SpecialType == SpecialType.System_Boolean; 237return type?.SpecialType == SpecialType.System_Object;
Symbols\ITypeSymbolInternal.cs (2)
18/// Returns <see cref="Microsoft.CodeAnalysis.SpecialType.None"/> if the type is not special. 20SpecialType SpecialType { get; }
Symbols\TypedConstant.cs (17)
129internal T? DecodeValue<T>(SpecialType specialType) 135internal bool TryDecodeValue<T>(SpecialType specialType, [MaybeNullWhen(false)] out T value) 143if (_type!.SpecialType == specialType || (_type.TypeKind == TypeKind.Enum && specialType == SpecialType.System_Enum)) 164case SpecialType.System_Boolean: 165case SpecialType.System_SByte: 166case SpecialType.System_Int16: 167case SpecialType.System_Int32: 168case SpecialType.System_Int64: 169case SpecialType.System_Byte: 170case SpecialType.System_UInt16: 171case SpecialType.System_UInt32: 172case SpecialType.System_UInt64: 173case SpecialType.System_Single: 174case SpecialType.System_Double: 175case SpecialType.System_Char: 176case SpecialType.System_String: 177case SpecialType.System_Object:
WellKnownMembers.cs (864)
25(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, // Return Type 26(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, 33(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, // Return Type 34(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, 35(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, 42(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 43(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 50(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 51(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 58(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 59(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt32, 66(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 67(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int64, 74(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 75(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt64, 82(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 83(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Single, 90(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 91(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, 98(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_SByte, // Return Type 99(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 106(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_SByte, // Return Type 107(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, 114(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_SByte, // Return Type 115(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Single, 122(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Byte, // Return Type 123(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 130(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Byte, // Return Type 131(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, 138(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Byte, // Return Type 139(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Single, 146(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int16, // Return Type 147(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 154(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int16, // Return Type 155(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, 162(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int16, // Return Type 163(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Single, 170(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt16, // Return Type 171(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 178(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt16, // Return Type 179(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, 186(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt16, // Return Type 187(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Single, 194(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Return Type 195(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 202(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Return Type 203(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, 210(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Return Type 211(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Single, 218(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt32, // Return Type 219(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 226(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt32, // Return Type 227(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, 234(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt32, // Return Type 235(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Single, 242(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int64, // Return Type 243(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 250(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int64, // Return Type 251(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, 258(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int64, // Return Type 259(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Single, 266(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt64, // Return Type 267(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 274(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt64, // Return Type 275(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, 282(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt64, // Return Type 283(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Single, 290(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Single, // Return Type 291(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 298(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, // Return Type 299(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 306(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 307(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 314(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 321(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 322(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 338(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_RuntimeTypeHandle, 344(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Field Signature 351(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 360(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 361(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 368(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 369(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 377(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_RuntimeMethodHandle, 385(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_RuntimeMethodHandle, 386(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_RuntimeTypeHandle, 393(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Delegate, // Return Type 395(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 403(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_RuntimeFieldHandle, 411(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_RuntimeFieldHandle, 412(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_RuntimeTypeHandle, 425(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 433(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 442(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 451(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Return Type 466(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 474(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 481(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 488(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 495(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 502(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 503(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 510(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 517(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 518(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 525(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Return Type 532(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 539(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 546(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 554(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 561(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 593(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 594(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 601(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 602(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 609(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 617(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 625(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 627(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 634(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 635(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 636(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Delegate, 643(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 644(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 645(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Delegate, 652(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 661(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 662(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 669(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 670(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 677(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 678(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 685(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 686(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 693(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 701(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 702(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int16, 717(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 724(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 725(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 726(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 733(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 734(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 741(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 742(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 749(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 750(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 757(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 770(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 782(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 818(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 826(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 843(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 854(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 866(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 867(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int64, 874(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 875(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Byte, 876(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Byte, 877(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt32, 878(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt32, 879(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt32, 886(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 887(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Byte, 888(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Byte, 889(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 890(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 891(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 898(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 905(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 912(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 913(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 920(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 921(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 928(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 935(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 942(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 949(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 951(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 958(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 965(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 966(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 994(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_RuntimeFieldHandle, 1001(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 1002(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1009(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 1010(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Array, 1011(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_RuntimeFieldHandle, 1018(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Return Type 1034(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 1043(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 1074(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 1081(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 1094(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 1102(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 1109(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 1124(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 1125(byte)SignatureTypeCode.ByReference, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1126(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1127(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1144(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 1145(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1152(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 1153(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1154(byte)SignatureTypeCode.ByReference, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 1161(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 1162(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1176(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Return Type 1188(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Collections_Generic_IEnumerable_T, 1211(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Collections_Generic_IEnumerable_T, 1222(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 1225(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Collections_Generic_IEnumerable_T, 1238(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Collections_Generic_IEnumerable_T, 1251(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Collections_Generic_IEnumerable_T, 1262(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 1264(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Collections_Generic_IEnumerable_T, 1269(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Collections_Generic_IEnumerable_T, 1280(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 1292(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Collections_Generic_IEnumerable_T, 1303(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 1306(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Collections_Generic_IEnumerable_T, 1320(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Collections_Generic_IEnumerable_T, 1331(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 1338(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, // Return Type 1339(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 1346(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 1347(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 1354(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_SByte, // Return Type 1355(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 1362(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Byte, // Return Type 1363(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 1370(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int16, // Return Type 1371(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 1378(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt16, // Return Type 1379(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 1386(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Return Type 1387(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 1394(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt32, // Return Type 1395(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 1402(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int64, // Return Type 1403(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 1410(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt64, // Return Type 1411(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 1418(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Single, // Return Type 1419(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 1426(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, // Return Type 1427(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 1434(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, // Return Type 1435(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 1442(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_DateTime, // Return Type 1443(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 1450(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Char, // Return Type 1451(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 1458(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Char, 1459(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 1466(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Return Type 1467(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 1474(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Return Type 1475(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 1482(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Return Type 1483(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Byte, 1490(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Return Type 1491(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt32, 1498(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Return Type 1499(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int64, 1506(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Return Type 1507(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt64, 1514(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Return Type 1515(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Single, 1522(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Return Type 1523(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, 1530(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Return Type 1531(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, 1538(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Return Type 1539(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_DateTime, 1546(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Return Type 1547(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Char, 1554(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Return Type 1555(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1562(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 1563(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1570(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_SByte, // Return Type 1571(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1578(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Byte, // Return Type 1579(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1586(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int16, // Return Type 1587(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1594(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt16, // Return Type 1595(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1602(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Return Type 1603(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1610(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt32, // Return Type 1611(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1618(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int64, // Return Type 1619(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1626(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt64, // Return Type 1627(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1634(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Single, // Return Type 1635(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1642(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, // Return Type 1643(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1650(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, // Return Type 1651(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1658(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_DateTime, // Return Type 1659(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1666(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Char, // Return Type 1667(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1674(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Char, 1675(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1683(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1690(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 1691(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1699(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 1700(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1707(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 1708(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1715(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 1716(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1723(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 1724(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1725(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1732(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 1733(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1734(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1741(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 1742(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1743(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1750(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 1751(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1752(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1759(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 1760(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1761(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1768(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 1769(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1770(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1777(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 1778(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1779(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1786(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 1787(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1788(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1795(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 1796(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1797(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1804(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 1805(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1806(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1813(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 1814(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1815(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1822(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 1823(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1824(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1831(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 1832(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1833(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1840(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 1841(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1842(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1843(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 1850(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 1851(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1852(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1853(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 1860(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1861(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1862(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1863(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 1870(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 1871(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1872(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1873(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 1880(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 1881(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1882(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1883(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 1890(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 1891(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1892(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1893(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 1900(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 1901(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1902(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1903(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 1910(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 1911(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1912(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1913(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 1920(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 1921(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1922(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1923(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 1930(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 1931(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1932(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1933(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 1940(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 1941(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1942(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1943(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 1950(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 1951(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1952(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1953(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 1960(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Return Type 1961(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 1962(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 1963(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 1970(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Return Type 1971(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 1972(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 1973(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 1980(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1981(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1983(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 1984(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1985(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 1987(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 1988(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 1995(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 1996(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 1998(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 1999(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2000(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 2002(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 2009(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2010(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2012(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 2013(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2014(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 2022(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2023(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2025(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 2026(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2027(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 2029(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 2030(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 2037(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 2038(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2039(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2040(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 2047(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2048(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2049(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2050(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 2057(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2058(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2059(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2060(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 2061(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 2062(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 2069(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2076(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2082(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int16, // Field Signature 2089(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2090(byte)SignatureTypeCode.ByReference, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 2091(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 2092(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 2093(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 2100(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2107(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2114(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Array, // Return Type 2115(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Array, 2116(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Array, 2123(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 2124(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 2125(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 2133(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 2134(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2135(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2144(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 2151(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2159(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2161(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 2168(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2175(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2182(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 2183(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2184(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2185(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2186(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2187(byte)SignatureTypeCode.ByReference, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2188(byte)SignatureTypeCode.ByReference, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2195(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 2196(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2197(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2198(byte)SignatureTypeCode.ByReference, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2205(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2206(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2213(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 2214(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2215(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 2217(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2224(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 2225(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2232(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Return Type 2233(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 2240(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Return Type 2241(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2248(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Return Type 2249(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 2256(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 2257(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2264(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Return Type 2265(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 2272(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Return Type 2273(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2280(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Return Type 2281(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 2288(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 2289(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2290(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 2292(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2299(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2306(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2321(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2329(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2336(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2338(byte)SignatureTypeCode.ByReference, (byte)SignatureTypeCode.GenericMethodParameter, (byte)SpecialType.System_Object, 2345(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2347(byte)SignatureTypeCode.ByReference, (byte)SignatureTypeCode.GenericMethodParameter, (byte)SpecialType.System_Object, 2354(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2362(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2377(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2385(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2392(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2394(byte)SignatureTypeCode.ByReference, (byte)SignatureTypeCode.GenericMethodParameter, (byte)SpecialType.System_Object, 2401(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2403(byte)SignatureTypeCode.ByReference, (byte)SignatureTypeCode.GenericMethodParameter, (byte)SpecialType.System_Object, 2410(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2418(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2440(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2448(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2456(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2458(byte)SignatureTypeCode.ByReference, (byte)SignatureTypeCode.GenericMethodParameter, (byte)SpecialType.System_Object, 2465(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2467(byte)SignatureTypeCode.ByReference, (byte)SignatureTypeCode.GenericMethodParameter, (byte)SpecialType.System_Object, 2474(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2482(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2500(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2508(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2516(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Return Type 2517(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Char, 2524(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Return Type 2525(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 2532(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Return Type 2533(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Char, 2540(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Return Type 2541(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 2548(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Char, 2549(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 2556(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Char, // Return Type 2557(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 2564(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2566(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2573(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2575(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 2583(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 2590(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2598(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Return Type 2605(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2835(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2843(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2852(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2862(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2873(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2885(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2898(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2912(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2928(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 2929(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 2936(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 2938(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 2939(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 2940(byte)SignatureTypeCode.ByReference, (byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 2941(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 2948(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 2950(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 2951(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 2952(byte)SignatureTypeCode.ByReference, (byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 2953(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 2961(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Method id 2969(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Method id 2970(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Lambda id 2978(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Method id 2979(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt64, // State machine instance id 2987(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Method id 2988(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Lambda id 2989(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt64, // State machine instance id 2996(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3003(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt64, // Return Type 3010(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3011(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Value 3012(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Local index 3019(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3020(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Byte, // Value 3021(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Local index 3028(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3029(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt16, // Value 3030(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Local index 3037(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3038(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt32, // Value 3039(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Local index 3046(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3047(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt64, // Value 3048(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Local index 3055(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3056(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Single, // Value 3057(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Local index 3064(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3065(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, // Value 3066(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Local index 3073(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3074(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, // Value 3075(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Local index 3082(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3083(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Value 3084(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Local index 3091(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3092(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Value 3093(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Local index 3100(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3101(byte)SignatureTypeCode.Pointer, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Value 3102(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Local index 3109(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3110(byte)SignatureTypeCode.Pointer, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Value address 3111(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Size 3112(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Local index 3119(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3120(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Source parameter index 3121(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Target local index 3128(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3129(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean,// Value 3130(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Parameter index 3137(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3138(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Byte, // Value 3139(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Parameter index 3146(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3147(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt16, // Value 3148(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Parameter index 3155(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3156(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt32, // Value 3157(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Parameter index 3164(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3165(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_UInt64, // Value 3166(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Parameter index 3173(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3174(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Single, // Value 3175(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Parameter index 3182(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3183(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, // Value 3184(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Parameter index 3191(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3192(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Decimal, // Value 3193(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Parameter index 3200(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3201(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Value 3202(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Parameter index 3209(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3210(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Value 3211(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Parameter index 3218(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3219(byte)SignatureTypeCode.Pointer, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Value 3220(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Local index 3227(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3228(byte)SignatureTypeCode.Pointer, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Value address 3229(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Size 3230(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Parameter index 3237(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3238(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Source parameter index 3239(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Target parameter index 3246(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3247(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Source local index 3248(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Target local index 3255(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 3256(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Byte, 3263(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 3264(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Byte, 3271(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 3272(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Byte, 3280(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 3281(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 3288(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3295(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3302(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3309(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3316(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3317(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 3318(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 3325(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3326(byte)SignatureTypeCode.Pointer, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 3327(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 3334(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3342(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3351(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 3358(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Return Type 3369(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 3370(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 3377(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3378(byte)SignatureTypeCode.Pointer, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 3379(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 3386(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3394(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3396(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 3397(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 3404(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3413(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 3420(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Return Type 3431(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 3432(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 3439(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3446(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Single, // Return type 3447(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Single, // Number As System.Single 3454(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, // Return type 3455(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, // Number As System.Double 3462(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Single, // Return type 3463(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Single, // Number As System.Single 3470(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, // Return type 3471(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, // Number As System.Double 3478(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, // Return Type 3479(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, 3486(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, // Return Type 3487(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, 3494(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, // Return Type 3495(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Double, 3502(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 3503(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 3504(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 3511(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 3512(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 3519(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 3565(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3595(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 3610(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int16, // Argument: short 3618(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int16, // Argument: short 3625(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3629(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 3630(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Argument 3631(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int16, // Argument 3639(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3646(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3654(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3662(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int16, 3670(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int16, // Argument: short 3678(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int16, // Argument: short 3685(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3689(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 3690(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Argument 3691(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int16, // Argument 3699(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3700(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int16, // Argument: short 3708(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int16, // Argument: short 3715(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3719(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 3720(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Argument 3721(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int16, // Argument 3729(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3734(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int16, // Argument 3741(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3749(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3751(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int16, // Argument 3765(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3772(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3774(byte)SignatureTypeCode.ByReference, (byte)SignatureTypeCode.GenericMethodParameter, (byte)SpecialType.System_Object, 3781(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3783(byte)SignatureTypeCode.ByReference, (byte)SignatureTypeCode.GenericMethodParameter, (byte)SpecialType.System_Object, 3790(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3798(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 3799(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 3806(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Return Type 3813(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 3814(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 3821(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 3828(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 3835(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 3836(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 3843(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 3851(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3874(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type, 3881(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3882(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Argument 3889(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3896(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3897(byte)SignatureTypeCode.SZArray, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 3905(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 3913(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Char, 3921(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 3928(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3935(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Return Type 3942(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3949(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3956(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3963(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 3964(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 3971(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 3986(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 4004(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Char, 4005(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 4012(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 4013(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 4020(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 4027(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 4034(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 4041(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 4042(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 4043(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 4050(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 4058(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Return Type 4065(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 4072(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 4079(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 4080(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Array, 4081(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 4088(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, // Return Type 4089(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 4096(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 4103(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 4110(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Return Type 4111(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 4118(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 4125(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 4126(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 4133(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Return Type 4134(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 4141(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 4142(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 4143(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 4150(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 4151(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 4158(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 4159(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 4166(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, 4173(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 4174(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 4181(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 4189(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Return Type 4196(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, // Return Type 4204(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 4206(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 4214(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 4221(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Return Type 4250(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 4255(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, 4287(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 4298(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 4328(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 4330(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Collections_Generic_IEnumerable_T, 4339(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Void, // Return Type 4351(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Collections_Generic_IEnumerable_T, 4362(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Collections_Generic_IEnumerable_T, 4390(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Object, 4469(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Collections_Generic_IEnumerable_T, 4490(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Collections_Generic_IEnumerable_T, 4613(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, 5064(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 5084(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 5104(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 5124(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 5144(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 5164(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Boolean, 5197(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_String, // Return Type 5198(byte)SignatureTypeCode.Pointer, (byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Byte, // Argument: byte* 5199(byte)SignatureTypeCode.TypeHandle, (byte)SpecialType.System_Int32, // Argument: int
WellKnownTypes.cs (1)
19Unknown = SpecialType.None,
Microsoft.CodeAnalysis.Analyzers (457)
MetaAnalyzers\CompareSymbolsCorrectlyAnalyzer.cs (3)
135&& containingType.SpecialType != SpecialType.System_Object) 298operation.Type.SpecialType != SpecialType.System_Object) 323return conversion.Type?.SpecialType == SpecialType.System_Object;
MetaAnalyzers\CompilerExtensionStrictApiAnalyzer.cs (1)
203if (argument is { Kind: TypedConstantKind.Primitive, Type.SpecialType: SpecialType.System_String })
MetaAnalyzers\DiagnosticAnalyzerAttributeAnalyzer.cs (1)
151argument.Type.SpecialType == SpecialType.System_String)
MetaAnalyzers\DiagnosticDescriptorCreationAnalyzer.cs (5)
550method.Parameters[0].Type.SpecialType == SpecialType.System_String; 572firstParamArgument.Parameter?.Type.SpecialType == SpecialType.System_String && 600invocation.Arguments[0].Parameter?.Type.SpecialType == SpecialType.System_String && 628if (titleArgument.Parameter?.Type.SpecialType == SpecialType.System_String) 1208argument.Value.Type.SpecialType == SpecialType.System_String &&
MetaAnalyzers\DiagnosticDescriptorCreationAnalyzer_IdRangeAndCategoryValidation.cs (2)
155argument.Value.Type.SpecialType == SpecialType.System_String && 162fieldReference.Field.Type.SpecialType == SpecialType.System_String)
MetaAnalyzers\Fixers\CompareSymbolsCorrectlyFix.cs (1)
274generator.TypeExpression(semanticModel.Compilation.GetSpecialType(SpecialType.System_Object)),
MetaAnalyzers\PreferIsKindAnalyzer.cs (1)
82if (conditionalAccess.Operation.Type!.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T)
src\Compilers\Core\Portable\SpecialTypeExtensions.cs (154)
17public static bool IsClrInteger(this SpecialType specialType) 21case SpecialType.System_Boolean: 22case SpecialType.System_Char: 23case SpecialType.System_Byte: 24case SpecialType.System_SByte: 25case SpecialType.System_Int16: 26case SpecialType.System_UInt16: 27case SpecialType.System_Int32: 28case SpecialType.System_UInt32: 29case SpecialType.System_Int64: 30case SpecialType.System_UInt64: 31case SpecialType.System_IntPtr: 32case SpecialType.System_UIntPtr: 42public static bool IsBlittable(this SpecialType specialType) 46case SpecialType.System_Boolean: 47case SpecialType.System_Char: 48case SpecialType.System_Byte: 49case SpecialType.System_SByte: 50case SpecialType.System_Int16: 51case SpecialType.System_UInt16: 52case SpecialType.System_Int32: 53case SpecialType.System_UInt32: 54case SpecialType.System_Int64: 55case SpecialType.System_UInt64: 56case SpecialType.System_Single: 57case SpecialType.System_Double: 64public static bool IsValueType(this SpecialType specialType) 68case SpecialType.System_Void: 69case SpecialType.System_Boolean: 70case SpecialType.System_Char: 71case SpecialType.System_Byte: 72case SpecialType.System_SByte: 73case SpecialType.System_Int16: 74case SpecialType.System_UInt16: 75case SpecialType.System_Int32: 76case SpecialType.System_UInt32: 77case SpecialType.System_Int64: 78case SpecialType.System_UInt64: 79case SpecialType.System_Single: 80case SpecialType.System_Double: 81case SpecialType.System_Decimal: 82case SpecialType.System_IntPtr: 83case SpecialType.System_UIntPtr: 84case SpecialType.System_Nullable_T: 85case SpecialType.System_DateTime: 86case SpecialType.System_TypedReference: 87case SpecialType.System_ArgIterator: 88case SpecialType.System_RuntimeArgumentHandle: 89case SpecialType.System_RuntimeFieldHandle: 90case SpecialType.System_RuntimeMethodHandle: 91case SpecialType.System_RuntimeTypeHandle: 98public static int SizeInBytes(this SpecialType specialType) 102case SpecialType.System_SByte: 104case SpecialType.System_Byte: 106case SpecialType.System_Int16: 108case SpecialType.System_UInt16: 110case SpecialType.System_Int32: 112case SpecialType.System_UInt32: 114case SpecialType.System_Int64: 116case SpecialType.System_UInt64: 118case SpecialType.System_Char: 120case SpecialType.System_Single: 122case SpecialType.System_Double: 124case SpecialType.System_Boolean: 127case SpecialType.System_Decimal: 141public static bool IsPrimitiveRecursiveStruct(this SpecialType specialType) 145case SpecialType.System_Boolean: 146case SpecialType.System_Byte: 147case SpecialType.System_Char: 148case SpecialType.System_Double: 149case SpecialType.System_Int16: 150case SpecialType.System_Int32: 151case SpecialType.System_Int64: 152case SpecialType.System_UInt16: 153case SpecialType.System_UInt32: 154case SpecialType.System_UInt64: 155case SpecialType.System_IntPtr: 156case SpecialType.System_UIntPtr: 157case SpecialType.System_SByte: 158case SpecialType.System_Single: 165public static bool IsValidEnumUnderlyingType(this SpecialType specialType) 169case SpecialType.System_Byte: 170case SpecialType.System_SByte: 171case SpecialType.System_Int16: 172case SpecialType.System_UInt16: 173case SpecialType.System_Int32: 174case SpecialType.System_UInt32: 175case SpecialType.System_Int64: 176case SpecialType.System_UInt64: 183public static bool IsNumericType(this SpecialType specialType) 187case SpecialType.System_Byte: 188case SpecialType.System_SByte: 189case SpecialType.System_Int16: 190case SpecialType.System_UInt16: 191case SpecialType.System_Int32: 192case SpecialType.System_UInt32: 193case SpecialType.System_Int64: 194case SpecialType.System_UInt64: 195case SpecialType.System_Single: 196case SpecialType.System_Double: 197case SpecialType.System_Decimal: 207public static bool IsIntegralType(this SpecialType specialType) 211case SpecialType.System_Byte: 212case SpecialType.System_SByte: 213case SpecialType.System_Int16: 214case SpecialType.System_UInt16: 215case SpecialType.System_Int32: 216case SpecialType.System_UInt32: 217case SpecialType.System_Int64: 218case SpecialType.System_UInt64: 225public static bool IsUnsignedIntegralType(this SpecialType specialType) 229case SpecialType.System_Byte: 230case SpecialType.System_UInt16: 231case SpecialType.System_UInt32: 232case SpecialType.System_UInt64: 239public static bool IsSignedIntegralType(this SpecialType specialType) 243case SpecialType.System_SByte: 244case SpecialType.System_Int16: 245case SpecialType.System_Int32: 246case SpecialType.System_Int64: 258public static int VBForToShiftBits(this SpecialType specialType) 262case SpecialType.System_SByte: 264case SpecialType.System_Int16: 266case SpecialType.System_Int32: 268case SpecialType.System_Int64: 275public static SpecialType FromRuntimeTypeOfLiteralValue(object value) 282return SpecialType.System_Int32; 287return SpecialType.System_String; 292return SpecialType.System_Boolean; 297return SpecialType.System_Char; 302return SpecialType.System_Int64; 307return SpecialType.System_Double; 312return SpecialType.System_UInt32; 317return SpecialType.System_UInt64; 322return SpecialType.System_Single; 327return SpecialType.System_Decimal; 332return SpecialType.System_Int16; 337return SpecialType.System_UInt16; 342return SpecialType.System_DateTime; 347return SpecialType.System_Byte; 352return SpecialType.System_SByte; 355return SpecialType.None; 365public static bool CanOptimizeBehavior(this SpecialType specialType) 366=> specialType is >= SpecialType.System_Object and <= SpecialType.System_Runtime_CompilerServices_InlineArrayAttribute; 371internal static ulong ConvertUnderlyingValueToUInt64(this SpecialType enumUnderlyingType, object value) 379SpecialType.System_SByte => (ulong)(sbyte)value, 380SpecialType.System_Int16 => (ulong)(short)value, 381SpecialType.System_Int32 => (ulong)(int)value, 382SpecialType.System_Int64 => (ulong)(long)value, 383SpecialType.System_Byte => (byte)value, 384SpecialType.System_UInt16 => (ushort)value, 385SpecialType.System_UInt32 => (uint)value, 386SpecialType.System_UInt64 => (ulong)value,
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (19)
340(binaryOperation.Type.SpecialType == SpecialType.System_Boolean && 374SpecialType.System_Boolean 375or SpecialType.System_Byte 376or SpecialType.System_Char 377or SpecialType.System_Double 378or SpecialType.System_Int16 379or SpecialType.System_Int32 380or SpecialType.System_Int64 381or SpecialType.System_UInt16 382or SpecialType.System_UInt32 383or SpecialType.System_UInt64 384or SpecialType.System_IntPtr 385or SpecialType.System_UIntPtr 386or SpecialType.System_SByte 387or SpecialType.System_Single 388or SpecialType.System_String 389or SpecialType.System_Object 390or SpecialType.System_ValueType 391or SpecialType.System_Void => true,
src\RoslynAnalyzers\Utilities\Compiler\DiagnosticHelpers.cs (11)
11public static bool TryConvertToUInt64(object? value, SpecialType specialType, out ulong convertedValue) 19case SpecialType.System_Int16: 23case SpecialType.System_Int32: 27case SpecialType.System_Int64: 31case SpecialType.System_UInt16: 35case SpecialType.System_UInt32: 39case SpecialType.System_UInt64: 43case SpecialType.System_Byte: 47case SpecialType.System_SByte: 51case SpecialType.System_Char: 55case SpecialType.System_Boolean:
src\RoslynAnalyzers\Utilities\Compiler\DoNotCatchGeneralUnlessRethrown.cs (1)
104compilation.GetSpecialType(SpecialType.System_Object),
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IMethodSymbolExtensions.cs (16)
31method.ReturnType.SpecialType == SpecialType.System_Boolean && 33method.Parameters[0].Type.SpecialType == SpecialType.System_Object && 43method.ContainingType.SpecialType == SpecialType.System_Object && 46method.ReturnType.SpecialType == SpecialType.System_Boolean && 48method.Parameters[0].Type.SpecialType == SpecialType.System_Object; 58method.ContainingType.SpecialType == SpecialType.System_Object && 60method.ReturnType.SpecialType == SpecialType.System_Boolean && 61method.Parameters[0].Type.SpecialType == SpecialType.System_Object && 62method.Parameters[1].Type.SpecialType == SpecialType.System_Object && 74if (overriddenMethod.ContainingType.SpecialType == SpecialType.System_Object) 189parameter.Type.SpecialType == SpecialType.System_Boolean && 238method.Parameters[0].Type.SpecialType == SpecialType.System_Boolean; 407method.Parameters[0].Type.SpecialType == SpecialType.System_Boolean && 421method.Parameters[1].Type.SpecialType == SpecialType.System_Boolean && 500method.Parameters[0].Type.SpecialType == SpecialType.System_Object; 540method.ReturnType.SpecialType == SpecialType.System_Boolean &&
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ITypeSymbolExtensions.cs (16)
22SpecialType.System_Boolean 23or SpecialType.System_Byte 24or SpecialType.System_Char 25or SpecialType.System_Double 26or SpecialType.System_Int16 27or SpecialType.System_Int32 28or SpecialType.System_Int64 29or SpecialType.System_UInt16 30or SpecialType.System_UInt32 31or SpecialType.System_UInt64 32or SpecialType.System_SByte 33or SpecialType.System_Single 34or SpecialType.System_String => true, 251=> typeSymbol.IsValueType || typeSymbol.SpecialType == SpecialType.System_String; 259=> typeSymbol != null && typeSymbol.IsValueType && typeSymbol.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T; 265=> typeSymbol.IsNullableValueType() && ((INamedTypeSymbol)typeSymbol).TypeArguments[0].SpecialType == SpecialType.System_Boolean;
src\RoslynAnalyzers\Utilities\Workspaces\SyntaxGeneratorExtensions.cs (4)
330generator.TypeExpression(SpecialType.System_Boolean), 386generator.ParameterDeclaration(argumentName.ToString(), generator.TypeExpression(SpecialType.System_Object)) 388returnType: generator.TypeExpression(SpecialType.System_Boolean), 409returnType: generator.TypeExpression(SpecialType.System_Int32),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (2)
157type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T || 174if (type.SpecialType == SpecialType.System_String)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SemanticFacts\ISemanticFactsExtensions.cs (2)
119=> type?.SpecialType is SpecialType.System_Single or SpecialType.System_Double;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Simplification\SpecialTypeAnnotation.cs (8)
14private static readonly ConcurrentDictionary<SpecialType, string> s_fromSpecialTypes = new(); 15private static readonly ConcurrentDictionary<string, SpecialType> s_toSpecialTypes = new(); 17public static SyntaxAnnotation Create(SpecialType specialType) 20public static SpecialType GetSpecialType(SyntaxAnnotation annotation) 23private static string CreateFromSpecialTypes(SpecialType arg) 26private static SpecialType CreateToSpecialTypes(string arg) 27=> (SpecialType)Enum.Parse(typeof(SpecialType), arg);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.NamedTypeSymbolKey.cs (1)
26visitor.WriteBoolean(symbol.SpecialType == SpecialType.System_IntPtr);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (6)
758&& symbol.ContainingType.SpecialType == SpecialType.System_Object 1017if (newReceiverType.SpecialType != SpecialType.None) 1024return newSymbolContainingType.SpecialType is SpecialType.System_Array or 1025SpecialType.System_Delegate or 1026SpecialType.System_Enum or 1027SpecialType.System_String;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (9)
58private static object CreateOne(SpecialType specialType) 61SpecialType.System_SByte => (sbyte)1, 62SpecialType.System_Byte => (byte)1, 63SpecialType.System_Int16 => (short)1, 64SpecialType.System_UInt16 => (ushort)1, 65SpecialType.System_Int32 => 1, 66SpecialType.System_UInt32 => (uint)1, 67SpecialType.System_Int64 => (long)1, 68SpecialType.System_UInt64 => (ulong)1,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IntegerUtilities.cs (7)
60public static long Convert(long v, SpecialType type) 63SpecialType.System_SByte => unchecked((sbyte)v), 64SpecialType.System_Byte => unchecked((byte)v), 65SpecialType.System_Int16 => unchecked((short)v), 66SpecialType.System_UInt16 => unchecked((ushort)v), 67SpecialType.System_Int32 => unchecked((int)v), 68SpecialType.System_UInt32 => unchecked((uint)v),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\IMethodSymbolExtensions.cs (2)
46method.Parameters is [{ Type.SpecialType: SpecialType.System_Object }, var secondParam] && 107methodSymbol.ReturnType.SpecialType == SpecialType.System_Int32 ||
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (1)
664ContainingType.SpecialType: SpecialType.System_Object,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (4)
512.Select(p => (p.Type ?? compilation.GetSpecialType(SpecialType.System_Object)).WithNullableAnnotation(p.NullableAnnotation)); 517types = types.Concat((method.ReturnType ?? compilation.GetSpecialType(SpecialType.System_Object)).WithNullableAnnotation(method.ReturnNullableAnnotation)); 680if (!returnType.GetMembers().OfType<IPropertySymbol>().Any(p => p.Name == WellKnownMemberNames.IsCompleted && p.Type.SpecialType == SpecialType.System_Boolean && p.GetMethod != null)) 730ReturnType.SpecialType: SpecialType.System_Boolean,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (56)
55=> symbol?.SpecialType == SpecialType.System_Void; 58=> symbol?.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T; 268case SpecialType.System_Array or SpecialType.System_ValueType: 271case SpecialType.System_Delegate: 272case SpecialType.System_MulticastDelegate: 273case SpecialType.System_Enum: 286case SpecialType.System_Byte: 287case SpecialType.System_SByte: 288case SpecialType.System_Int16: 289case SpecialType.System_UInt16: 290case SpecialType.System_Int32: 291case SpecialType.System_UInt32: 292case SpecialType.System_Int64: 293case SpecialType.System_UInt64: 294case SpecialType.System_Single: 295case SpecialType.System_Double: 296case SpecialType.System_Decimal: 297case SpecialType.System_IntPtr when type.IsNativeIntegerType: 298case SpecialType.System_UIntPtr when type.IsNativeIntegerType: 374case SpecialType.System_Object: 375case SpecialType.System_Void: 376case SpecialType.System_Boolean: 377case SpecialType.System_SByte: 378case SpecialType.System_Byte: 379case SpecialType.System_Decimal: 380case SpecialType.System_Single: 381case SpecialType.System_Double: 382case SpecialType.System_Int16: 383case SpecialType.System_Int32: 384case SpecialType.System_Int64: 385case SpecialType.System_Char: 386case SpecialType.System_String: 387case SpecialType.System_UInt16: 388case SpecialType.System_UInt32: 389case SpecialType.System_UInt64: 390case SpecialType.System_IntPtr when symbol.IsNativeIntegerType: 391case SpecialType.System_UIntPtr when symbol.IsNativeIntegerType: 402typeSymbol.AllInterfaces.Any(static i => i.SpecialType == SpecialType.System_Collections_IEnumerable) && 651case SpecialType.System_Boolean: 652case SpecialType.System_Char: 653case SpecialType.System_SByte: 654case SpecialType.System_Byte: 655case SpecialType.System_Int16: 656case SpecialType.System_UInt16: 657case SpecialType.System_Int32: 658case SpecialType.System_UInt32: 659case SpecialType.System_Int64: 660case SpecialType.System_UInt64: 661case SpecialType.System_Decimal: 662case SpecialType.System_Single: 663case SpecialType.System_Double: 666case SpecialType.System_IntPtr: 667case SpecialType.System_UIntPtr: 670case SpecialType.System_DateTime: 759namedType.OriginalDefinition.GetAttributes().Any(static a => a.AttributeClass?.SpecialType == SpecialType.System_Runtime_CompilerServices_InlineArrayAttribute);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\PredefinedTypeExtensions.cs (41)
13public static SpecialType ToSpecialType(this PredefinedType predefinedType) 16PredefinedType.Object => SpecialType.System_Object, 17PredefinedType.Void => SpecialType.System_Void, 18PredefinedType.Boolean => SpecialType.System_Boolean, 19PredefinedType.Char => SpecialType.System_Char, 20PredefinedType.SByte => SpecialType.System_SByte, 21PredefinedType.Byte => SpecialType.System_Byte, 22PredefinedType.Int16 => SpecialType.System_Int16, 23PredefinedType.UInt16 => SpecialType.System_UInt16, 24PredefinedType.Int32 => SpecialType.System_Int32, 25PredefinedType.UInt32 => SpecialType.System_UInt32, 26PredefinedType.Int64 => SpecialType.System_Int64, 27PredefinedType.UInt64 => SpecialType.System_UInt64, 28PredefinedType.Decimal => SpecialType.System_Decimal, 29PredefinedType.Single => SpecialType.System_Single, 30PredefinedType.Double => SpecialType.System_Double, 31PredefinedType.String => SpecialType.System_String, 32PredefinedType.DateTime => SpecialType.System_DateTime, 33PredefinedType.IntPtr => SpecialType.System_IntPtr, 34PredefinedType.UIntPtr => SpecialType.System_UIntPtr, 35_ => SpecialType.None, 38public static PredefinedType ToPredefinedType(this SpecialType specialType) 41SpecialType.System_Object => PredefinedType.Object, 42SpecialType.System_Void => PredefinedType.Void, 43SpecialType.System_Boolean => PredefinedType.Boolean, 44SpecialType.System_Char => PredefinedType.Char, 45SpecialType.System_SByte => PredefinedType.SByte, 46SpecialType.System_Byte => PredefinedType.Byte, 47SpecialType.System_Int16 => PredefinedType.Int16, 48SpecialType.System_UInt16 => PredefinedType.UInt16, 49SpecialType.System_Int32 => PredefinedType.Int32, 50SpecialType.System_UInt32 => PredefinedType.UInt32, 51SpecialType.System_Int64 => PredefinedType.Int64, 52SpecialType.System_UInt64 => PredefinedType.UInt64, 53SpecialType.System_Decimal => PredefinedType.Decimal, 54SpecialType.System_Single => PredefinedType.Single, 55SpecialType.System_Double => PredefinedType.Double, 56SpecialType.System_String => PredefinedType.String, 57SpecialType.System_DateTime => PredefinedType.DateTime, 58SpecialType.System_IntPtr => PredefinedType.IntPtr, 59SpecialType.System_UIntPtr => PredefinedType.UIntPtr,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.cs (1)
198=> symbol.IsKind(SymbolKind.NamedType, out ITypeSymbol? typeSymbol) && typeSymbol.SpecialType == SpecialType.System_Object;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractFlagsEnumGenerator.cs (5)
15protected abstract SyntaxNode CreateExplicitlyCastedLiteralValue(INamedTypeSymbol enumType, SpecialType underlyingSpecialType, object constantValue); 78var underlyingSpecialType = enumType.EnumUnderlyingType.SpecialType; 138IFieldSymbol field, INamedTypeSymbol enumType, SpecialType underlyingSpecialType) 172var underlyingSpecialType = enumType.EnumUnderlyingType.SpecialType; 188var underlyingSpecialType = enumType.EnumUnderlyingType.SpecialType;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (12)
83public static bool IsSpecialType([NotNullWhen(true)] ITypeSymbol? type, SpecialType specialType) 136SpecialType.System_SByte => value is sbyte, 137SpecialType.System_Byte => value is byte, 138SpecialType.System_Int16 => value is short, 139SpecialType.System_UInt16 => value is ushort, 140SpecialType.System_Int32 => value is int, 141SpecialType.System_UInt32 => value is uint, 142SpecialType.System_Int64 => value is long, 143SpecialType.System_UInt64 => value is ulong, 144SpecialType.System_Decimal => value is decimal, 145SpecialType.System_Single => value is float, 146SpecialType.System_Double => value is double,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationSymbolFactory.cs (5)
422SpecialType specialType = SpecialType.None, 441SpecialType specialType = SpecialType.None, 493specialType: SpecialType.None,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\LiteralSpecialValues.cs (11)
16public static bool HasSpecialValues(SpecialType specialType) 20case SpecialType.System_SByte: 21case SpecialType.System_Int16: 22case SpecialType.System_UInt16: 23case SpecialType.System_Int32: 24case SpecialType.System_UInt32: 25case SpecialType.System_Int64: 26case SpecialType.System_UInt64: 27case SpecialType.System_Single: 28case SpecialType.System_Double: 29case SpecialType.System_Decimal:
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationAbstractNamedTypeSymbol.cs (1)
29SpecialType specialType,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationArrayTypeSymbol.cs (1)
10internal sealed class CodeGenerationArrayTypeSymbol(ITypeSymbol elementType, int rank, NullableAnnotation nullableAnnotation) : CodeGenerationTypeSymbol(null, null, default, Accessibility.NotApplicable, default, string.Empty, SpecialType.None, nullableAnnotation), IArrayTypeSymbol
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationMethodSymbol.cs (1)
75=> this.ReturnType == null || this.ReturnType.SpecialType == SpecialType.System_Void;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationNamedTypeSymbol.cs (1)
34SpecialType specialType,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationPointerTypeSymbol.cs (1)
9internal sealed class CodeGenerationPointerTypeSymbol(ITypeSymbol pointedAtType) : CodeGenerationTypeSymbol(null, null, default, Accessibility.NotApplicable, default, string.Empty, SpecialType.None, NullableAnnotation.None), IPointerTypeSymbol
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationTypeParameterSymbol.cs (1)
24int ordinal) : CodeGenerationTypeSymbol(containingType?.ContainingAssembly, containingType, attributes, Accessibility.NotApplicable, default, name, SpecialType.None, nullableAnnotation), ITypeParameterSymbol
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationTypeSymbol.cs (2)
19SpecialType specialType, 23public SpecialType SpecialType { get; protected set; } = specialType;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (1)
85_ => compilation.GetSpecialType(SpecialType.System_Object),
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (19)
50returnType: compilation.GetSpecialType(SpecialType.System_Boolean), 55parameters: [CodeGenerationSymbolFactory.CreateParameterSymbol(compilation.GetSpecialType(SpecialType.System_Object).WithNullableAnnotation(NullableAnnotation.Annotated), ObjName)], 411case SpecialType.System_Boolean: 412case SpecialType.System_Char: 413case SpecialType.System_SByte: 414case SpecialType.System_Byte: 415case SpecialType.System_Int16: 416case SpecialType.System_UInt16: 417case SpecialType.System_Int32: 418case SpecialType.System_UInt32: 419case SpecialType.System_Int64: 420case SpecialType.System_UInt64: 421case SpecialType.System_Decimal: 422case SpecialType.System_Single: 423case SpecialType.System_Double: 424case SpecialType.System_String: 425case SpecialType.System_DateTime: 443method.ReturnType.SpecialType == SpecialType.System_Boolean && 444method.Parameters[0].Type.SpecialType == SpecialType.System_Object &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateGetHashCodeMethod.cs (4)
136? factory.SimpleLocalDeclarationStatement(generatorInternal, compilation.GetSpecialType(SpecialType.System_Int32), HashCodeName, CreateLiteralExpression(factory, initHash)) 137: factory.LocalDeclarationStatement(compilation.GetSpecialType(SpecialType.System_Int64), HashCodeName, CreateLiteralExpression(factory, initHash))); 166compilation.GetSpecialType(SpecialType.System_Int32), 210method.ReturnType.SpecialType == SpecialType.System_Int32 &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (12)
60SpecialType? patternValueType, 184else if (operation is IIsTypeOperation { TypeOperand.SpecialType: SpecialType.System_Object } && generatorInternal.SupportsPatterns(semanticModel.SyntaxTree.Options)) 305SpecialType? patternValueType) 307if (patternValueType is SpecialType specialType && specialType.IsNumericType()) 447if (containingType?.SpecialType == SpecialType.System_Array || 448containingType?.SpecialType == SpecialType.System_String) 458case SpecialType.System_Byte: 459case SpecialType.System_UInt16: 460case SpecialType.System_UInt32: 461case SpecialType.System_UInt64: 497SpecialType? patternValueType) 504if (patternValueType == SpecialType.System_Boolean)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.AbstractTypeInferrer.cs (2)
78protected IEnumerable<TypeInferenceInfo> CreateResult(SpecialType type, NullableAnnotation nullableAnnotation = NullableAnnotation.None) 120symbol.ContainingType?.SpecialType == SpecialType.System_Enum;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.cs (1)
46? [semanticModel.Compilation.GetSpecialType(SpecialType.System_Boolean)]
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\SimplificationHelpers.cs (2)
77var specialType = SpecialTypeAnnotation.GetSpecialType(annotation2); 78if (specialType != SpecialType.None)
Microsoft.CodeAnalysis.AnalyzerUtilities (432)
src\Compilers\Core\Portable\SpecialTypeExtensions.cs (154)
17public static bool IsClrInteger(this SpecialType specialType) 21case SpecialType.System_Boolean: 22case SpecialType.System_Char: 23case SpecialType.System_Byte: 24case SpecialType.System_SByte: 25case SpecialType.System_Int16: 26case SpecialType.System_UInt16: 27case SpecialType.System_Int32: 28case SpecialType.System_UInt32: 29case SpecialType.System_Int64: 30case SpecialType.System_UInt64: 31case SpecialType.System_IntPtr: 32case SpecialType.System_UIntPtr: 42public static bool IsBlittable(this SpecialType specialType) 46case SpecialType.System_Boolean: 47case SpecialType.System_Char: 48case SpecialType.System_Byte: 49case SpecialType.System_SByte: 50case SpecialType.System_Int16: 51case SpecialType.System_UInt16: 52case SpecialType.System_Int32: 53case SpecialType.System_UInt32: 54case SpecialType.System_Int64: 55case SpecialType.System_UInt64: 56case SpecialType.System_Single: 57case SpecialType.System_Double: 64public static bool IsValueType(this SpecialType specialType) 68case SpecialType.System_Void: 69case SpecialType.System_Boolean: 70case SpecialType.System_Char: 71case SpecialType.System_Byte: 72case SpecialType.System_SByte: 73case SpecialType.System_Int16: 74case SpecialType.System_UInt16: 75case SpecialType.System_Int32: 76case SpecialType.System_UInt32: 77case SpecialType.System_Int64: 78case SpecialType.System_UInt64: 79case SpecialType.System_Single: 80case SpecialType.System_Double: 81case SpecialType.System_Decimal: 82case SpecialType.System_IntPtr: 83case SpecialType.System_UIntPtr: 84case SpecialType.System_Nullable_T: 85case SpecialType.System_DateTime: 86case SpecialType.System_TypedReference: 87case SpecialType.System_ArgIterator: 88case SpecialType.System_RuntimeArgumentHandle: 89case SpecialType.System_RuntimeFieldHandle: 90case SpecialType.System_RuntimeMethodHandle: 91case SpecialType.System_RuntimeTypeHandle: 98public static int SizeInBytes(this SpecialType specialType) 102case SpecialType.System_SByte: 104case SpecialType.System_Byte: 106case SpecialType.System_Int16: 108case SpecialType.System_UInt16: 110case SpecialType.System_Int32: 112case SpecialType.System_UInt32: 114case SpecialType.System_Int64: 116case SpecialType.System_UInt64: 118case SpecialType.System_Char: 120case SpecialType.System_Single: 122case SpecialType.System_Double: 124case SpecialType.System_Boolean: 127case SpecialType.System_Decimal: 141public static bool IsPrimitiveRecursiveStruct(this SpecialType specialType) 145case SpecialType.System_Boolean: 146case SpecialType.System_Byte: 147case SpecialType.System_Char: 148case SpecialType.System_Double: 149case SpecialType.System_Int16: 150case SpecialType.System_Int32: 151case SpecialType.System_Int64: 152case SpecialType.System_UInt16: 153case SpecialType.System_UInt32: 154case SpecialType.System_UInt64: 155case SpecialType.System_IntPtr: 156case SpecialType.System_UIntPtr: 157case SpecialType.System_SByte: 158case SpecialType.System_Single: 165public static bool IsValidEnumUnderlyingType(this SpecialType specialType) 169case SpecialType.System_Byte: 170case SpecialType.System_SByte: 171case SpecialType.System_Int16: 172case SpecialType.System_UInt16: 173case SpecialType.System_Int32: 174case SpecialType.System_UInt32: 175case SpecialType.System_Int64: 176case SpecialType.System_UInt64: 183public static bool IsNumericType(this SpecialType specialType) 187case SpecialType.System_Byte: 188case SpecialType.System_SByte: 189case SpecialType.System_Int16: 190case SpecialType.System_UInt16: 191case SpecialType.System_Int32: 192case SpecialType.System_UInt32: 193case SpecialType.System_Int64: 194case SpecialType.System_UInt64: 195case SpecialType.System_Single: 196case SpecialType.System_Double: 197case SpecialType.System_Decimal: 207public static bool IsIntegralType(this SpecialType specialType) 211case SpecialType.System_Byte: 212case SpecialType.System_SByte: 213case SpecialType.System_Int16: 214case SpecialType.System_UInt16: 215case SpecialType.System_Int32: 216case SpecialType.System_UInt32: 217case SpecialType.System_Int64: 218case SpecialType.System_UInt64: 225public static bool IsUnsignedIntegralType(this SpecialType specialType) 229case SpecialType.System_Byte: 230case SpecialType.System_UInt16: 231case SpecialType.System_UInt32: 232case SpecialType.System_UInt64: 239public static bool IsSignedIntegralType(this SpecialType specialType) 243case SpecialType.System_SByte: 244case SpecialType.System_Int16: 245case SpecialType.System_Int32: 246case SpecialType.System_Int64: 258public static int VBForToShiftBits(this SpecialType specialType) 262case SpecialType.System_SByte: 264case SpecialType.System_Int16: 266case SpecialType.System_Int32: 268case SpecialType.System_Int64: 275public static SpecialType FromRuntimeTypeOfLiteralValue(object value) 282return SpecialType.System_Int32; 287return SpecialType.System_String; 292return SpecialType.System_Boolean; 297return SpecialType.System_Char; 302return SpecialType.System_Int64; 307return SpecialType.System_Double; 312return SpecialType.System_UInt32; 317return SpecialType.System_UInt64; 322return SpecialType.System_Single; 327return SpecialType.System_Decimal; 332return SpecialType.System_Int16; 337return SpecialType.System_UInt16; 342return SpecialType.System_DateTime; 347return SpecialType.System_Byte; 352return SpecialType.System_SByte; 355return SpecialType.None; 365public static bool CanOptimizeBehavior(this SpecialType specialType) 366=> specialType is >= SpecialType.System_Object and <= SpecialType.System_Runtime_CompilerServices_InlineArrayAttribute; 371internal static ulong ConvertUnderlyingValueToUInt64(this SpecialType enumUnderlyingType, object value) 379SpecialType.System_SByte => (ulong)(sbyte)value, 380SpecialType.System_Int16 => (ulong)(short)value, 381SpecialType.System_Int32 => (ulong)(int)value, 382SpecialType.System_Int64 => (ulong)(long)value, 383SpecialType.System_Byte => (byte)value, 384SpecialType.System_UInt16 => (ushort)value, 385SpecialType.System_UInt32 => (uint)value, 386SpecialType.System_UInt64 => (ulong)value,
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (19)
340(binaryOperation.Type.SpecialType == SpecialType.System_Boolean && 374SpecialType.System_Boolean 375or SpecialType.System_Byte 376or SpecialType.System_Char 377or SpecialType.System_Double 378or SpecialType.System_Int16 379or SpecialType.System_Int32 380or SpecialType.System_Int64 381or SpecialType.System_UInt16 382or SpecialType.System_UInt32 383or SpecialType.System_UInt64 384or SpecialType.System_IntPtr 385or SpecialType.System_UIntPtr 386or SpecialType.System_SByte 387or SpecialType.System_Single 388or SpecialType.System_String 389or SpecialType.System_Object 390or SpecialType.System_ValueType 391or SpecialType.System_Void => true,
src\RoslynAnalyzers\Utilities\Compiler\DiagnosticHelpers.cs (11)
11public static bool TryConvertToUInt64(object? value, SpecialType specialType, out ulong convertedValue) 19case SpecialType.System_Int16: 23case SpecialType.System_Int32: 27case SpecialType.System_Int64: 31case SpecialType.System_UInt16: 35case SpecialType.System_UInt32: 39case SpecialType.System_UInt64: 43case SpecialType.System_Byte: 47case SpecialType.System_SByte: 51case SpecialType.System_Char: 55case SpecialType.System_Boolean:
src\RoslynAnalyzers\Utilities\Compiler\DoNotCatchGeneralUnlessRethrown.cs (1)
104compilation.GetSpecialType(SpecialType.System_Object),
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IMethodSymbolExtensions.cs (16)
31method.ReturnType.SpecialType == SpecialType.System_Boolean && 33method.Parameters[0].Type.SpecialType == SpecialType.System_Object && 43method.ContainingType.SpecialType == SpecialType.System_Object && 46method.ReturnType.SpecialType == SpecialType.System_Boolean && 48method.Parameters[0].Type.SpecialType == SpecialType.System_Object; 58method.ContainingType.SpecialType == SpecialType.System_Object && 60method.ReturnType.SpecialType == SpecialType.System_Boolean && 61method.Parameters[0].Type.SpecialType == SpecialType.System_Object && 62method.Parameters[1].Type.SpecialType == SpecialType.System_Object && 74if (overriddenMethod.ContainingType.SpecialType == SpecialType.System_Object) 189parameter.Type.SpecialType == SpecialType.System_Boolean && 238method.Parameters[0].Type.SpecialType == SpecialType.System_Boolean; 407method.Parameters[0].Type.SpecialType == SpecialType.System_Boolean && 421method.Parameters[1].Type.SpecialType == SpecialType.System_Boolean && 500method.Parameters[0].Type.SpecialType == SpecialType.System_Object; 540method.ReturnType.SpecialType == SpecialType.System_Boolean &&
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ITypeSymbolExtensions.cs (16)
22SpecialType.System_Boolean 23or SpecialType.System_Byte 24or SpecialType.System_Char 25or SpecialType.System_Double 26or SpecialType.System_Int16 27or SpecialType.System_Int32 28or SpecialType.System_Int64 29or SpecialType.System_UInt16 30or SpecialType.System_UInt32 31or SpecialType.System_UInt64 32or SpecialType.System_SByte 33or SpecialType.System_Single 34or SpecialType.System_String => true, 251=> typeSymbol.IsValueType || typeSymbol.SpecialType == SpecialType.System_String; 259=> typeSymbol != null && typeSymbol.IsValueType && typeSymbol.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T; 265=> typeSymbol.IsNullableValueType() && ((INamedTypeSymbol)typeSymbol).TypeArguments[0].SpecialType == SpecialType.System_Boolean;
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\DisposeAnalysis\DisposeAnalysis.DisposeDataFlowOperationVisitor.cs (2)
194invocation.TargetMethod.ReturnType.SpecialType == SpecialType.System_Boolean && 343invocation.TargetMethod.ReturnType.SpecialType == SpecialType.System_Boolean)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PointsToAnalysis\PointsToAnalysis.PointsToDataFlowOperationVisitor.cs (2)
1000method.ContainingType.SpecialType != SpecialType.None || 1021(symbol.ContainingType.SpecialType != SpecialType.None ||
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\TaintedDataAnalysis\HardcodedBytesSources.cs (4)
50arguments[0].Parameter?.Type.SpecialType == SpecialType.System_String, 63arguments[0].Parameter?.Type.SpecialType == SpecialType.System_String, 79arrayTypeSymbol.ElementType.SpecialType == SpecialType.System_Char, 88arguments[0].Parameter?.Type.SpecialType == SpecialType.System_String,
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\TaintedDataAnalysis\HardcodedSymmetricAlgorithmKeysSources.cs (4)
59arguments[0].Parameter?.Type.SpecialType == SpecialType.System_String, 72arguments[0].Parameter?.Type.SpecialType == SpecialType.System_String, 89arrayTypeSymbol.ElementType.SpecialType == SpecialType.System_Char, 96arguments[0].Parameter?.Type.SpecialType == SpecialType.System_String,
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\TaintedDataAnalysis\StringTransferSources.cs (7)
38(firstParameter.Type.SpecialType == SpecialType.System_String || 39firstParameter.Type.SpecialType == SpecialType.System_Char || 42arrayType.ElementType.SpecialType == SpecialType.System_Char) || 44pointerType.PointedAtType.SpecialType == SpecialType.System_Char)), 87(secondParameter.Type.SpecialType == SpecialType.System_String || 88secondParameter.Type.SpecialType == SpecialType.System_Char || 91arrayType.ElementType.SpecialType == SpecialType.System_Char)),
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\TaintedDataAnalysis\TaintedDataAnalysis.TaintedDataOperationVisitor.cs (1)
697&& taintedArgument.Parameter.Type.SpecialType == SpecialType.System_String)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\ValueContentAnalysis\ValueContentAbstractValue.cs (42)
47case SpecialType.System_Byte: 48case SpecialType.System_Double: 49case SpecialType.System_Int16: 50case SpecialType.System_Int32: 51case SpecialType.System_Int64: 52case SpecialType.System_UInt16: 53case SpecialType.System_UInt32: 54case SpecialType.System_UInt64: 55case SpecialType.System_SByte: 56case SpecialType.System_Single: 65case SpecialType.System_String: 73case SpecialType.System_Boolean: 302case SpecialType.System_String: 303return type2.SpecialType == SpecialType.System_String && 306case SpecialType.System_Char: 307return type2.SpecialType == SpecialType.System_Char && 310case SpecialType.System_Boolean: 311return type2.SpecialType == SpecialType.System_Boolean && 314case SpecialType.System_Byte: 315case SpecialType.System_Int16: 316case SpecialType.System_Int32: 317case SpecialType.System_Int64: 318case SpecialType.System_UInt16: 319case SpecialType.System_UInt32: 320case SpecialType.System_SByte: 321case SpecialType.System_UInt64: 328case SpecialType.System_SByte: 332case SpecialType.System_Int16: 336case SpecialType.System_Int32: 340case SpecialType.System_Int64: 344case SpecialType.System_Byte: 348case SpecialType.System_UInt16: 352case SpecialType.System_UInt32: 356case SpecialType.System_UInt64: 360case SpecialType.System_Boolean: 368case SpecialType.System_Double: 369case SpecialType.System_Single: 372case SpecialType.System_Single: 373case SpecialType.System_Double: 378case SpecialType.System_Single: 382case SpecialType.System_Double: 386case SpecialType.System_Boolean:
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\ValueContentAnalysis\ValueContentAnalysis.ValueContentDataFlowOperationVisitor.cs (2)
244var incrementValueType = WellKnownTypeProvider.Compilation.GetSpecialType(SpecialType.System_Int32); 262operation.Field.ContainingType.SpecialType == SpecialType.System_String)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\AnalysisEntity.cs (2)
295=> Type.SpecialType == SpecialType.System_Boolean || 297Type.Language == LanguageNames.VisualBasic && Type.SpecialType == SpecialType.System_Object;
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\AnalysisEntityFactory.cs (1)
416type ??= _wellKnownTypeProvider.Compilation.GetSpecialType(SpecialType.System_Object);
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowOperationVisitor.cs (7)
350method.Parameters[0].Type.SpecialType == SpecialType.System_Boolean; 747if (branch.BranchValue.Type?.SpecialType == SpecialType.System_Boolean && 993var validationMethods = requiresMethods.Concat(assumeMethods).Concat(assertMethods).OfType<IMethodSymbol>().Where(m => m.IsStatic && m.ReturnsVoid && !m.Parameters.IsEmpty && (m.Parameters[0].Type.SpecialType == SpecialType.System_Boolean)); 1697if (invocation.Type?.SpecialType != SpecialType.System_Boolean) 1861operation.Type?.SpecialType == SpecialType.System_Boolean && 2405argument.Parameter?.Type.SpecialType == SpecialType.System_Object) 3231operation.Type?.SpecialType == SpecialType.System_Boolean &&
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\ThrownExceptionInfo.cs (1)
55nestedRegion.ExceptionType.SpecialType == SpecialType.System_Object ||
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (2)
157type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T || 174if (type.SpecialType == SpecialType.System_String)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SemanticFacts\ISemanticFactsExtensions.cs (2)
119=> type?.SpecialType is SpecialType.System_Single or SpecialType.System_Double;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Simplification\SpecialTypeAnnotation.cs (8)
14private static readonly ConcurrentDictionary<SpecialType, string> s_fromSpecialTypes = new(); 15private static readonly ConcurrentDictionary<string, SpecialType> s_toSpecialTypes = new(); 17public static SyntaxAnnotation Create(SpecialType specialType) 20public static SpecialType GetSpecialType(SyntaxAnnotation annotation) 23private static string CreateFromSpecialTypes(SpecialType arg) 26private static SpecialType CreateToSpecialTypes(string arg) 27=> (SpecialType)Enum.Parse(typeof(SpecialType), arg);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.NamedTypeSymbolKey.cs (1)
26visitor.WriteBoolean(symbol.SpecialType == SpecialType.System_IntPtr);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (6)
758&& symbol.ContainingType.SpecialType == SpecialType.System_Object 1017if (newReceiverType.SpecialType != SpecialType.None) 1024return newSymbolContainingType.SpecialType is SpecialType.System_Array or 1025SpecialType.System_Delegate or 1026SpecialType.System_Enum or 1027SpecialType.System_String;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (9)
58private static object CreateOne(SpecialType specialType) 61SpecialType.System_SByte => (sbyte)1, 62SpecialType.System_Byte => (byte)1, 63SpecialType.System_Int16 => (short)1, 64SpecialType.System_UInt16 => (ushort)1, 65SpecialType.System_Int32 => 1, 66SpecialType.System_UInt32 => (uint)1, 67SpecialType.System_Int64 => (long)1, 68SpecialType.System_UInt64 => (ulong)1,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IntegerUtilities.cs (7)
60public static long Convert(long v, SpecialType type) 63SpecialType.System_SByte => unchecked((sbyte)v), 64SpecialType.System_Byte => unchecked((byte)v), 65SpecialType.System_Int16 => unchecked((short)v), 66SpecialType.System_UInt16 => unchecked((ushort)v), 67SpecialType.System_Int32 => unchecked((int)v), 68SpecialType.System_UInt32 => unchecked((uint)v),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\IMethodSymbolExtensions.cs (2)
46method.Parameters is [{ Type.SpecialType: SpecialType.System_Object }, var secondParam] && 107methodSymbol.ReturnType.SpecialType == SpecialType.System_Int32 ||
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (1)
664ContainingType.SpecialType: SpecialType.System_Object,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (4)
512.Select(p => (p.Type ?? compilation.GetSpecialType(SpecialType.System_Object)).WithNullableAnnotation(p.NullableAnnotation)); 517types = types.Concat((method.ReturnType ?? compilation.GetSpecialType(SpecialType.System_Object)).WithNullableAnnotation(method.ReturnNullableAnnotation)); 680if (!returnType.GetMembers().OfType<IPropertySymbol>().Any(p => p.Name == WellKnownMemberNames.IsCompleted && p.Type.SpecialType == SpecialType.System_Boolean && p.GetMethod != null)) 730ReturnType.SpecialType: SpecialType.System_Boolean,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (56)
55=> symbol?.SpecialType == SpecialType.System_Void; 58=> symbol?.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T; 268case SpecialType.System_Array or SpecialType.System_ValueType: 271case SpecialType.System_Delegate: 272case SpecialType.System_MulticastDelegate: 273case SpecialType.System_Enum: 286case SpecialType.System_Byte: 287case SpecialType.System_SByte: 288case SpecialType.System_Int16: 289case SpecialType.System_UInt16: 290case SpecialType.System_Int32: 291case SpecialType.System_UInt32: 292case SpecialType.System_Int64: 293case SpecialType.System_UInt64: 294case SpecialType.System_Single: 295case SpecialType.System_Double: 296case SpecialType.System_Decimal: 297case SpecialType.System_IntPtr when type.IsNativeIntegerType: 298case SpecialType.System_UIntPtr when type.IsNativeIntegerType: 374case SpecialType.System_Object: 375case SpecialType.System_Void: 376case SpecialType.System_Boolean: 377case SpecialType.System_SByte: 378case SpecialType.System_Byte: 379case SpecialType.System_Decimal: 380case SpecialType.System_Single: 381case SpecialType.System_Double: 382case SpecialType.System_Int16: 383case SpecialType.System_Int32: 384case SpecialType.System_Int64: 385case SpecialType.System_Char: 386case SpecialType.System_String: 387case SpecialType.System_UInt16: 388case SpecialType.System_UInt32: 389case SpecialType.System_UInt64: 390case SpecialType.System_IntPtr when symbol.IsNativeIntegerType: 391case SpecialType.System_UIntPtr when symbol.IsNativeIntegerType: 402typeSymbol.AllInterfaces.Any(static i => i.SpecialType == SpecialType.System_Collections_IEnumerable) && 651case SpecialType.System_Boolean: 652case SpecialType.System_Char: 653case SpecialType.System_SByte: 654case SpecialType.System_Byte: 655case SpecialType.System_Int16: 656case SpecialType.System_UInt16: 657case SpecialType.System_Int32: 658case SpecialType.System_UInt32: 659case SpecialType.System_Int64: 660case SpecialType.System_UInt64: 661case SpecialType.System_Decimal: 662case SpecialType.System_Single: 663case SpecialType.System_Double: 666case SpecialType.System_IntPtr: 667case SpecialType.System_UIntPtr: 670case SpecialType.System_DateTime: 759namedType.OriginalDefinition.GetAttributes().Any(static a => a.AttributeClass?.SpecialType == SpecialType.System_Runtime_CompilerServices_InlineArrayAttribute);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\PredefinedTypeExtensions.cs (41)
13public static SpecialType ToSpecialType(this PredefinedType predefinedType) 16PredefinedType.Object => SpecialType.System_Object, 17PredefinedType.Void => SpecialType.System_Void, 18PredefinedType.Boolean => SpecialType.System_Boolean, 19PredefinedType.Char => SpecialType.System_Char, 20PredefinedType.SByte => SpecialType.System_SByte, 21PredefinedType.Byte => SpecialType.System_Byte, 22PredefinedType.Int16 => SpecialType.System_Int16, 23PredefinedType.UInt16 => SpecialType.System_UInt16, 24PredefinedType.Int32 => SpecialType.System_Int32, 25PredefinedType.UInt32 => SpecialType.System_UInt32, 26PredefinedType.Int64 => SpecialType.System_Int64, 27PredefinedType.UInt64 => SpecialType.System_UInt64, 28PredefinedType.Decimal => SpecialType.System_Decimal, 29PredefinedType.Single => SpecialType.System_Single, 30PredefinedType.Double => SpecialType.System_Double, 31PredefinedType.String => SpecialType.System_String, 32PredefinedType.DateTime => SpecialType.System_DateTime, 33PredefinedType.IntPtr => SpecialType.System_IntPtr, 34PredefinedType.UIntPtr => SpecialType.System_UIntPtr, 35_ => SpecialType.None, 38public static PredefinedType ToPredefinedType(this SpecialType specialType) 41SpecialType.System_Object => PredefinedType.Object, 42SpecialType.System_Void => PredefinedType.Void, 43SpecialType.System_Boolean => PredefinedType.Boolean, 44SpecialType.System_Char => PredefinedType.Char, 45SpecialType.System_SByte => PredefinedType.SByte, 46SpecialType.System_Byte => PredefinedType.Byte, 47SpecialType.System_Int16 => PredefinedType.Int16, 48SpecialType.System_UInt16 => PredefinedType.UInt16, 49SpecialType.System_Int32 => PredefinedType.Int32, 50SpecialType.System_UInt32 => PredefinedType.UInt32, 51SpecialType.System_Int64 => PredefinedType.Int64, 52SpecialType.System_UInt64 => PredefinedType.UInt64, 53SpecialType.System_Decimal => PredefinedType.Decimal, 54SpecialType.System_Single => PredefinedType.Single, 55SpecialType.System_Double => PredefinedType.Double, 56SpecialType.System_String => PredefinedType.String, 57SpecialType.System_DateTime => PredefinedType.DateTime, 58SpecialType.System_IntPtr => PredefinedType.IntPtr, 59SpecialType.System_UIntPtr => PredefinedType.UIntPtr,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.cs (1)
198=> symbol.IsKind(SymbolKind.NamedType, out ITypeSymbol? typeSymbol) && typeSymbol.SpecialType == SpecialType.System_Object;
Microsoft.CodeAnalysis.BannedApiAnalyzers (441)
RestrictedInternalsVisibleToAnalyzer.cs (2)
141assemblyAttribute.AttributeConstructor.Parameters[0].Type.SpecialType != SpecialType.System_String || 144arrayType.ElementType.SpecialType != SpecialType.System_String ||
src\Compilers\Core\Portable\SpecialTypeExtensions.cs (154)
17public static bool IsClrInteger(this SpecialType specialType) 21case SpecialType.System_Boolean: 22case SpecialType.System_Char: 23case SpecialType.System_Byte: 24case SpecialType.System_SByte: 25case SpecialType.System_Int16: 26case SpecialType.System_UInt16: 27case SpecialType.System_Int32: 28case SpecialType.System_UInt32: 29case SpecialType.System_Int64: 30case SpecialType.System_UInt64: 31case SpecialType.System_IntPtr: 32case SpecialType.System_UIntPtr: 42public static bool IsBlittable(this SpecialType specialType) 46case SpecialType.System_Boolean: 47case SpecialType.System_Char: 48case SpecialType.System_Byte: 49case SpecialType.System_SByte: 50case SpecialType.System_Int16: 51case SpecialType.System_UInt16: 52case SpecialType.System_Int32: 53case SpecialType.System_UInt32: 54case SpecialType.System_Int64: 55case SpecialType.System_UInt64: 56case SpecialType.System_Single: 57case SpecialType.System_Double: 64public static bool IsValueType(this SpecialType specialType) 68case SpecialType.System_Void: 69case SpecialType.System_Boolean: 70case SpecialType.System_Char: 71case SpecialType.System_Byte: 72case SpecialType.System_SByte: 73case SpecialType.System_Int16: 74case SpecialType.System_UInt16: 75case SpecialType.System_Int32: 76case SpecialType.System_UInt32: 77case SpecialType.System_Int64: 78case SpecialType.System_UInt64: 79case SpecialType.System_Single: 80case SpecialType.System_Double: 81case SpecialType.System_Decimal: 82case SpecialType.System_IntPtr: 83case SpecialType.System_UIntPtr: 84case SpecialType.System_Nullable_T: 85case SpecialType.System_DateTime: 86case SpecialType.System_TypedReference: 87case SpecialType.System_ArgIterator: 88case SpecialType.System_RuntimeArgumentHandle: 89case SpecialType.System_RuntimeFieldHandle: 90case SpecialType.System_RuntimeMethodHandle: 91case SpecialType.System_RuntimeTypeHandle: 98public static int SizeInBytes(this SpecialType specialType) 102case SpecialType.System_SByte: 104case SpecialType.System_Byte: 106case SpecialType.System_Int16: 108case SpecialType.System_UInt16: 110case SpecialType.System_Int32: 112case SpecialType.System_UInt32: 114case SpecialType.System_Int64: 116case SpecialType.System_UInt64: 118case SpecialType.System_Char: 120case SpecialType.System_Single: 122case SpecialType.System_Double: 124case SpecialType.System_Boolean: 127case SpecialType.System_Decimal: 141public static bool IsPrimitiveRecursiveStruct(this SpecialType specialType) 145case SpecialType.System_Boolean: 146case SpecialType.System_Byte: 147case SpecialType.System_Char: 148case SpecialType.System_Double: 149case SpecialType.System_Int16: 150case SpecialType.System_Int32: 151case SpecialType.System_Int64: 152case SpecialType.System_UInt16: 153case SpecialType.System_UInt32: 154case SpecialType.System_UInt64: 155case SpecialType.System_IntPtr: 156case SpecialType.System_UIntPtr: 157case SpecialType.System_SByte: 158case SpecialType.System_Single: 165public static bool IsValidEnumUnderlyingType(this SpecialType specialType) 169case SpecialType.System_Byte: 170case SpecialType.System_SByte: 171case SpecialType.System_Int16: 172case SpecialType.System_UInt16: 173case SpecialType.System_Int32: 174case SpecialType.System_UInt32: 175case SpecialType.System_Int64: 176case SpecialType.System_UInt64: 183public static bool IsNumericType(this SpecialType specialType) 187case SpecialType.System_Byte: 188case SpecialType.System_SByte: 189case SpecialType.System_Int16: 190case SpecialType.System_UInt16: 191case SpecialType.System_Int32: 192case SpecialType.System_UInt32: 193case SpecialType.System_Int64: 194case SpecialType.System_UInt64: 195case SpecialType.System_Single: 196case SpecialType.System_Double: 197case SpecialType.System_Decimal: 207public static bool IsIntegralType(this SpecialType specialType) 211case SpecialType.System_Byte: 212case SpecialType.System_SByte: 213case SpecialType.System_Int16: 214case SpecialType.System_UInt16: 215case SpecialType.System_Int32: 216case SpecialType.System_UInt32: 217case SpecialType.System_Int64: 218case SpecialType.System_UInt64: 225public static bool IsUnsignedIntegralType(this SpecialType specialType) 229case SpecialType.System_Byte: 230case SpecialType.System_UInt16: 231case SpecialType.System_UInt32: 232case SpecialType.System_UInt64: 239public static bool IsSignedIntegralType(this SpecialType specialType) 243case SpecialType.System_SByte: 244case SpecialType.System_Int16: 245case SpecialType.System_Int32: 246case SpecialType.System_Int64: 258public static int VBForToShiftBits(this SpecialType specialType) 262case SpecialType.System_SByte: 264case SpecialType.System_Int16: 266case SpecialType.System_Int32: 268case SpecialType.System_Int64: 275public static SpecialType FromRuntimeTypeOfLiteralValue(object value) 282return SpecialType.System_Int32; 287return SpecialType.System_String; 292return SpecialType.System_Boolean; 297return SpecialType.System_Char; 302return SpecialType.System_Int64; 307return SpecialType.System_Double; 312return SpecialType.System_UInt32; 317return SpecialType.System_UInt64; 322return SpecialType.System_Single; 327return SpecialType.System_Decimal; 332return SpecialType.System_Int16; 337return SpecialType.System_UInt16; 342return SpecialType.System_DateTime; 347return SpecialType.System_Byte; 352return SpecialType.System_SByte; 355return SpecialType.None; 365public static bool CanOptimizeBehavior(this SpecialType specialType) 366=> specialType is >= SpecialType.System_Object and <= SpecialType.System_Runtime_CompilerServices_InlineArrayAttribute; 371internal static ulong ConvertUnderlyingValueToUInt64(this SpecialType enumUnderlyingType, object value) 379SpecialType.System_SByte => (ulong)(sbyte)value, 380SpecialType.System_Int16 => (ulong)(short)value, 381SpecialType.System_Int32 => (ulong)(int)value, 382SpecialType.System_Int64 => (ulong)(long)value, 383SpecialType.System_Byte => (byte)value, 384SpecialType.System_UInt16 => (ushort)value, 385SpecialType.System_UInt32 => (uint)value, 386SpecialType.System_UInt64 => (ulong)value,
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (19)
340(binaryOperation.Type.SpecialType == SpecialType.System_Boolean && 374SpecialType.System_Boolean 375or SpecialType.System_Byte 376or SpecialType.System_Char 377or SpecialType.System_Double 378or SpecialType.System_Int16 379or SpecialType.System_Int32 380or SpecialType.System_Int64 381or SpecialType.System_UInt16 382or SpecialType.System_UInt32 383or SpecialType.System_UInt64 384or SpecialType.System_IntPtr 385or SpecialType.System_UIntPtr 386or SpecialType.System_SByte 387or SpecialType.System_Single 388or SpecialType.System_String 389or SpecialType.System_Object 390or SpecialType.System_ValueType 391or SpecialType.System_Void => true,
src\RoslynAnalyzers\Utilities\Compiler\DiagnosticHelpers.cs (11)
11public static bool TryConvertToUInt64(object? value, SpecialType specialType, out ulong convertedValue) 19case SpecialType.System_Int16: 23case SpecialType.System_Int32: 27case SpecialType.System_Int64: 31case SpecialType.System_UInt16: 35case SpecialType.System_UInt32: 39case SpecialType.System_UInt64: 43case SpecialType.System_Byte: 47case SpecialType.System_SByte: 51case SpecialType.System_Char: 55case SpecialType.System_Boolean:
src\RoslynAnalyzers\Utilities\Compiler\DoNotCatchGeneralUnlessRethrown.cs (1)
104compilation.GetSpecialType(SpecialType.System_Object),
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IMethodSymbolExtensions.cs (16)
31method.ReturnType.SpecialType == SpecialType.System_Boolean && 33method.Parameters[0].Type.SpecialType == SpecialType.System_Object && 43method.ContainingType.SpecialType == SpecialType.System_Object && 46method.ReturnType.SpecialType == SpecialType.System_Boolean && 48method.Parameters[0].Type.SpecialType == SpecialType.System_Object; 58method.ContainingType.SpecialType == SpecialType.System_Object && 60method.ReturnType.SpecialType == SpecialType.System_Boolean && 61method.Parameters[0].Type.SpecialType == SpecialType.System_Object && 62method.Parameters[1].Type.SpecialType == SpecialType.System_Object && 74if (overriddenMethod.ContainingType.SpecialType == SpecialType.System_Object) 189parameter.Type.SpecialType == SpecialType.System_Boolean && 238method.Parameters[0].Type.SpecialType == SpecialType.System_Boolean; 407method.Parameters[0].Type.SpecialType == SpecialType.System_Boolean && 421method.Parameters[1].Type.SpecialType == SpecialType.System_Boolean && 500method.Parameters[0].Type.SpecialType == SpecialType.System_Object; 540method.ReturnType.SpecialType == SpecialType.System_Boolean &&
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ITypeSymbolExtensions.cs (16)
22SpecialType.System_Boolean 23or SpecialType.System_Byte 24or SpecialType.System_Char 25or SpecialType.System_Double 26or SpecialType.System_Int16 27or SpecialType.System_Int32 28or SpecialType.System_Int64 29or SpecialType.System_UInt16 30or SpecialType.System_UInt32 31or SpecialType.System_UInt64 32or SpecialType.System_SByte 33or SpecialType.System_Single 34or SpecialType.System_String => true, 251=> typeSymbol.IsValueType || typeSymbol.SpecialType == SpecialType.System_String; 259=> typeSymbol != null && typeSymbol.IsValueType && typeSymbol.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T; 265=> typeSymbol.IsNullableValueType() && ((INamedTypeSymbol)typeSymbol).TypeArguments[0].SpecialType == SpecialType.System_Boolean;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (2)
157type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T || 174if (type.SpecialType == SpecialType.System_String)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SemanticFacts\ISemanticFactsExtensions.cs (2)
119=> type?.SpecialType is SpecialType.System_Single or SpecialType.System_Double;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Simplification\SpecialTypeAnnotation.cs (8)
14private static readonly ConcurrentDictionary<SpecialType, string> s_fromSpecialTypes = new(); 15private static readonly ConcurrentDictionary<string, SpecialType> s_toSpecialTypes = new(); 17public static SyntaxAnnotation Create(SpecialType specialType) 20public static SpecialType GetSpecialType(SyntaxAnnotation annotation) 23private static string CreateFromSpecialTypes(SpecialType arg) 26private static SpecialType CreateToSpecialTypes(string arg) 27=> (SpecialType)Enum.Parse(typeof(SpecialType), arg);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.NamedTypeSymbolKey.cs (1)
26visitor.WriteBoolean(symbol.SpecialType == SpecialType.System_IntPtr);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (6)
758&& symbol.ContainingType.SpecialType == SpecialType.System_Object 1017if (newReceiverType.SpecialType != SpecialType.None) 1024return newSymbolContainingType.SpecialType is SpecialType.System_Array or 1025SpecialType.System_Delegate or 1026SpecialType.System_Enum or 1027SpecialType.System_String;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (9)
58private static object CreateOne(SpecialType specialType) 61SpecialType.System_SByte => (sbyte)1, 62SpecialType.System_Byte => (byte)1, 63SpecialType.System_Int16 => (short)1, 64SpecialType.System_UInt16 => (ushort)1, 65SpecialType.System_Int32 => 1, 66SpecialType.System_UInt32 => (uint)1, 67SpecialType.System_Int64 => (long)1, 68SpecialType.System_UInt64 => (ulong)1,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IntegerUtilities.cs (7)
60public static long Convert(long v, SpecialType type) 63SpecialType.System_SByte => unchecked((sbyte)v), 64SpecialType.System_Byte => unchecked((byte)v), 65SpecialType.System_Int16 => unchecked((short)v), 66SpecialType.System_UInt16 => unchecked((ushort)v), 67SpecialType.System_Int32 => unchecked((int)v), 68SpecialType.System_UInt32 => unchecked((uint)v),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\IMethodSymbolExtensions.cs (2)
46method.Parameters is [{ Type.SpecialType: SpecialType.System_Object }, var secondParam] && 107methodSymbol.ReturnType.SpecialType == SpecialType.System_Int32 ||
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (1)
664ContainingType.SpecialType: SpecialType.System_Object,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (4)
512.Select(p => (p.Type ?? compilation.GetSpecialType(SpecialType.System_Object)).WithNullableAnnotation(p.NullableAnnotation)); 517types = types.Concat((method.ReturnType ?? compilation.GetSpecialType(SpecialType.System_Object)).WithNullableAnnotation(method.ReturnNullableAnnotation)); 680if (!returnType.GetMembers().OfType<IPropertySymbol>().Any(p => p.Name == WellKnownMemberNames.IsCompleted && p.Type.SpecialType == SpecialType.System_Boolean && p.GetMethod != null)) 730ReturnType.SpecialType: SpecialType.System_Boolean,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (56)
55=> symbol?.SpecialType == SpecialType.System_Void; 58=> symbol?.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T; 268case SpecialType.System_Array or SpecialType.System_ValueType: 271case SpecialType.System_Delegate: 272case SpecialType.System_MulticastDelegate: 273case SpecialType.System_Enum: 286case SpecialType.System_Byte: 287case SpecialType.System_SByte: 288case SpecialType.System_Int16: 289case SpecialType.System_UInt16: 290case SpecialType.System_Int32: 291case SpecialType.System_UInt32: 292case SpecialType.System_Int64: 293case SpecialType.System_UInt64: 294case SpecialType.System_Single: 295case SpecialType.System_Double: 296case SpecialType.System_Decimal: 297case SpecialType.System_IntPtr when type.IsNativeIntegerType: 298case SpecialType.System_UIntPtr when type.IsNativeIntegerType: 374case SpecialType.System_Object: 375case SpecialType.System_Void: 376case SpecialType.System_Boolean: 377case SpecialType.System_SByte: 378case SpecialType.System_Byte: 379case SpecialType.System_Decimal: 380case SpecialType.System_Single: 381case SpecialType.System_Double: 382case SpecialType.System_Int16: 383case SpecialType.System_Int32: 384case SpecialType.System_Int64: 385case SpecialType.System_Char: 386case SpecialType.System_String: 387case SpecialType.System_UInt16: 388case SpecialType.System_UInt32: 389case SpecialType.System_UInt64: 390case SpecialType.System_IntPtr when symbol.IsNativeIntegerType: 391case SpecialType.System_UIntPtr when symbol.IsNativeIntegerType: 402typeSymbol.AllInterfaces.Any(static i => i.SpecialType == SpecialType.System_Collections_IEnumerable) && 651case SpecialType.System_Boolean: 652case SpecialType.System_Char: 653case SpecialType.System_SByte: 654case SpecialType.System_Byte: 655case SpecialType.System_Int16: 656case SpecialType.System_UInt16: 657case SpecialType.System_Int32: 658case SpecialType.System_UInt32: 659case SpecialType.System_Int64: 660case SpecialType.System_UInt64: 661case SpecialType.System_Decimal: 662case SpecialType.System_Single: 663case SpecialType.System_Double: 666case SpecialType.System_IntPtr: 667case SpecialType.System_UIntPtr: 670case SpecialType.System_DateTime: 759namedType.OriginalDefinition.GetAttributes().Any(static a => a.AttributeClass?.SpecialType == SpecialType.System_Runtime_CompilerServices_InlineArrayAttribute);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\PredefinedTypeExtensions.cs (41)
13public static SpecialType ToSpecialType(this PredefinedType predefinedType) 16PredefinedType.Object => SpecialType.System_Object, 17PredefinedType.Void => SpecialType.System_Void, 18PredefinedType.Boolean => SpecialType.System_Boolean, 19PredefinedType.Char => SpecialType.System_Char, 20PredefinedType.SByte => SpecialType.System_SByte, 21PredefinedType.Byte => SpecialType.System_Byte, 22PredefinedType.Int16 => SpecialType.System_Int16, 23PredefinedType.UInt16 => SpecialType.System_UInt16, 24PredefinedType.Int32 => SpecialType.System_Int32, 25PredefinedType.UInt32 => SpecialType.System_UInt32, 26PredefinedType.Int64 => SpecialType.System_Int64, 27PredefinedType.UInt64 => SpecialType.System_UInt64, 28PredefinedType.Decimal => SpecialType.System_Decimal, 29PredefinedType.Single => SpecialType.System_Single, 30PredefinedType.Double => SpecialType.System_Double, 31PredefinedType.String => SpecialType.System_String, 32PredefinedType.DateTime => SpecialType.System_DateTime, 33PredefinedType.IntPtr => SpecialType.System_IntPtr, 34PredefinedType.UIntPtr => SpecialType.System_UIntPtr, 35_ => SpecialType.None, 38public static PredefinedType ToPredefinedType(this SpecialType specialType) 41SpecialType.System_Object => PredefinedType.Object, 42SpecialType.System_Void => PredefinedType.Void, 43SpecialType.System_Boolean => PredefinedType.Boolean, 44SpecialType.System_Char => PredefinedType.Char, 45SpecialType.System_SByte => PredefinedType.SByte, 46SpecialType.System_Byte => PredefinedType.Byte, 47SpecialType.System_Int16 => PredefinedType.Int16, 48SpecialType.System_UInt16 => PredefinedType.UInt16, 49SpecialType.System_Int32 => PredefinedType.Int32, 50SpecialType.System_UInt32 => PredefinedType.UInt32, 51SpecialType.System_Int64 => PredefinedType.Int64, 52SpecialType.System_UInt64 => PredefinedType.UInt64, 53SpecialType.System_Decimal => PredefinedType.Decimal, 54SpecialType.System_Single => PredefinedType.Single, 55SpecialType.System_Double => PredefinedType.Double, 56SpecialType.System_String => PredefinedType.String, 57SpecialType.System_DateTime => PredefinedType.DateTime, 58SpecialType.System_IntPtr => PredefinedType.IntPtr, 59SpecialType.System_UIntPtr => PredefinedType.UIntPtr,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.cs (1)
198=> symbol.IsKind(SymbolKind.NamedType, out ITypeSymbol? typeSymbol) && typeSymbol.SpecialType == SpecialType.System_Object;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractFlagsEnumGenerator.cs (5)
15protected abstract SyntaxNode CreateExplicitlyCastedLiteralValue(INamedTypeSymbol enumType, SpecialType underlyingSpecialType, object constantValue); 78var underlyingSpecialType = enumType.EnumUnderlyingType.SpecialType; 138IFieldSymbol field, INamedTypeSymbol enumType, SpecialType underlyingSpecialType) 172var underlyingSpecialType = enumType.EnumUnderlyingType.SpecialType; 188var underlyingSpecialType = enumType.EnumUnderlyingType.SpecialType;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (12)
83public static bool IsSpecialType([NotNullWhen(true)] ITypeSymbol? type, SpecialType specialType) 136SpecialType.System_SByte => value is sbyte, 137SpecialType.System_Byte => value is byte, 138SpecialType.System_Int16 => value is short, 139SpecialType.System_UInt16 => value is ushort, 140SpecialType.System_Int32 => value is int, 141SpecialType.System_UInt32 => value is uint, 142SpecialType.System_Int64 => value is long, 143SpecialType.System_UInt64 => value is ulong, 144SpecialType.System_Decimal => value is decimal, 145SpecialType.System_Single => value is float, 146SpecialType.System_Double => value is double,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationSymbolFactory.cs (5)
422SpecialType specialType = SpecialType.None, 441SpecialType specialType = SpecialType.None, 493specialType: SpecialType.None,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\LiteralSpecialValues.cs (11)
16public static bool HasSpecialValues(SpecialType specialType) 20case SpecialType.System_SByte: 21case SpecialType.System_Int16: 22case SpecialType.System_UInt16: 23case SpecialType.System_Int32: 24case SpecialType.System_UInt32: 25case SpecialType.System_Int64: 26case SpecialType.System_UInt64: 27case SpecialType.System_Single: 28case SpecialType.System_Double: 29case SpecialType.System_Decimal:
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationAbstractNamedTypeSymbol.cs (1)
29SpecialType specialType,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationArrayTypeSymbol.cs (1)
10internal sealed class CodeGenerationArrayTypeSymbol(ITypeSymbol elementType, int rank, NullableAnnotation nullableAnnotation) : CodeGenerationTypeSymbol(null, null, default, Accessibility.NotApplicable, default, string.Empty, SpecialType.None, nullableAnnotation), IArrayTypeSymbol
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationMethodSymbol.cs (1)
75=> this.ReturnType == null || this.ReturnType.SpecialType == SpecialType.System_Void;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationNamedTypeSymbol.cs (1)
34SpecialType specialType,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationPointerTypeSymbol.cs (1)
9internal sealed class CodeGenerationPointerTypeSymbol(ITypeSymbol pointedAtType) : CodeGenerationTypeSymbol(null, null, default, Accessibility.NotApplicable, default, string.Empty, SpecialType.None, NullableAnnotation.None), IPointerTypeSymbol
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationTypeParameterSymbol.cs (1)
24int ordinal) : CodeGenerationTypeSymbol(containingType?.ContainingAssembly, containingType, attributes, Accessibility.NotApplicable, default, name, SpecialType.None, nullableAnnotation), ITypeParameterSymbol
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationTypeSymbol.cs (2)
19SpecialType specialType, 23public SpecialType SpecialType { get; protected set; } = specialType;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (1)
85_ => compilation.GetSpecialType(SpecialType.System_Object),
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (19)
50returnType: compilation.GetSpecialType(SpecialType.System_Boolean), 55parameters: [CodeGenerationSymbolFactory.CreateParameterSymbol(compilation.GetSpecialType(SpecialType.System_Object).WithNullableAnnotation(NullableAnnotation.Annotated), ObjName)], 411case SpecialType.System_Boolean: 412case SpecialType.System_Char: 413case SpecialType.System_SByte: 414case SpecialType.System_Byte: 415case SpecialType.System_Int16: 416case SpecialType.System_UInt16: 417case SpecialType.System_Int32: 418case SpecialType.System_UInt32: 419case SpecialType.System_Int64: 420case SpecialType.System_UInt64: 421case SpecialType.System_Decimal: 422case SpecialType.System_Single: 423case SpecialType.System_Double: 424case SpecialType.System_String: 425case SpecialType.System_DateTime: 443method.ReturnType.SpecialType == SpecialType.System_Boolean && 444method.Parameters[0].Type.SpecialType == SpecialType.System_Object &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateGetHashCodeMethod.cs (4)
136? factory.SimpleLocalDeclarationStatement(generatorInternal, compilation.GetSpecialType(SpecialType.System_Int32), HashCodeName, CreateLiteralExpression(factory, initHash)) 137: factory.LocalDeclarationStatement(compilation.GetSpecialType(SpecialType.System_Int64), HashCodeName, CreateLiteralExpression(factory, initHash))); 166compilation.GetSpecialType(SpecialType.System_Int32), 210method.ReturnType.SpecialType == SpecialType.System_Int32 &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (12)
60SpecialType? patternValueType, 184else if (operation is IIsTypeOperation { TypeOperand.SpecialType: SpecialType.System_Object } && generatorInternal.SupportsPatterns(semanticModel.SyntaxTree.Options)) 305SpecialType? patternValueType) 307if (patternValueType is SpecialType specialType && specialType.IsNumericType()) 447if (containingType?.SpecialType == SpecialType.System_Array || 448containingType?.SpecialType == SpecialType.System_String) 458case SpecialType.System_Byte: 459case SpecialType.System_UInt16: 460case SpecialType.System_UInt32: 461case SpecialType.System_UInt64: 497SpecialType? patternValueType) 504if (patternValueType == SpecialType.System_Boolean)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.AbstractTypeInferrer.cs (2)
78protected IEnumerable<TypeInferenceInfo> CreateResult(SpecialType type, NullableAnnotation nullableAnnotation = NullableAnnotation.None) 120symbol.ContainingType?.SpecialType == SpecialType.System_Enum;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.cs (1)
46? [semanticModel.Compilation.GetSpecialType(SpecialType.System_Boolean)]
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\SimplificationHelpers.cs (2)
77var specialType = SpecialTypeAnnotation.GetSpecialType(annotation2); 78if (specialType != SpecialType.None)
Microsoft.CodeAnalysis.CodeStyle (326)
src\Analyzers\Core\Analyzers\ForEachCast\AbstractForEachCastDiagnosticAnalyzer.cs (7)
98if (collectionElementType.SpecialType == SpecialType.System_Object) 100var ienumerableOfT = collectionType.AllInterfaces.FirstOrDefault(i => i.OriginalDefinition.SpecialType == SpecialType.System_Collections_Generic_IEnumerable_T); 141var isFixable = collectionType.SpecialType == SpecialType.System_Collections_IEnumerable || collectionType.AllInterfaces.Any(static i => i.SpecialType == SpecialType.System_Collections_IEnumerable) && 157=> collectionElementType.SpecialType != SpecialType.System_Object || 158collectionType.OriginalDefinition.SpecialType == SpecialType.System_Collections_Generic_IEnumerable_T || 159collectionType.AllInterfaces.Any(static i => i.OriginalDefinition.SpecialType == SpecialType.System_Collections_Generic_IEnumerable_T);
src\Analyzers\Core\Analyzers\Helpers\HashCodeAnalyzer\HashCodeAnalyzer.cs (1)
30var objectType = compilation.GetSpecialType(SpecialType.System_Object);
src\Analyzers\Core\Analyzers\PopulateSwitch\AbstractPopulateSwitchDiagnosticAnalyzer.cs (2)
84if (typeWithoutNullable.SpecialType == SpecialType.System_Boolean) 100if (type.RemoveNullableIfPresent() is not { SpecialType: SpecialType.System_Boolean })
src\Analyzers\Core\Analyzers\PopulateSwitch\PopulateSwitchStatementHelpers.cs (1)
158if (member is not IFieldSymbol fieldSymbol || fieldSymbol.Type.SpecialType != SpecialType.None)
src\Analyzers\Core\Analyzers\RemoveRedundantEquality\AbstractRemoveRedundantEqualityDiagnosticAnalyzer.cs (2)
88if (leftType?.SpecialType != SpecialType.System_Boolean || 89rightType?.SpecialType != SpecialType.System_Boolean)
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (2)
849attribute.AttributeConstructor?.Parameters is [_, { Name: "checkId", Type.SpecialType: SpecialType.System_String }, ..] && 858attribute.AttributeConstructor.Parameters[0].Type.SpecialType == SpecialType.System_String &&
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (2)
777attribute.ConstructorArguments is [{ Kind: TypedConstantKind.Primitive, Type.SpecialType: SpecialType.System_String, Value: string value }]) 939(IsSpecialMethodWithMatchingProperty("ShouldSerialize") && methodSymbol.ReturnType.SpecialType == SpecialType.System_Boolean ||
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.BlockAnalyzer.cs (1)
177value.Type.SpecialType == SpecialType.System_Void)
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.cs (3)
233method.Parameters is [{ Type.SpecialType: SpecialType.System_Object }, var secondParam] && 273if (method is { MetadataName: "GetInstance", IsStatic: true, Parameters: [{ Type.SpecialType: SpecialType.System_String }] } && 295if (parameter.Type.SpecialType != SpecialType.System_Int32)
src\Analyzers\Core\Analyzers\SimplifyBooleanExpression\AbstractSimplifyConditionalDiagnosticAnalyzer.cs (2)
154typeInfo.Type?.SpecialType == SpecialType.System_Boolean && 155typeInfo.ConvertedType?.SpecialType == SpecialType.System_Boolean;
src\Analyzers\Core\Analyzers\SimplifyInterpolation\AbstractSimplifyInterpolationHelpers.cs (1)
139return method.ContainingType.SpecialType == SpecialType.System_Object
src\Analyzers\Core\Analyzers\UseIsNullCheck\AbstractUseIsNullForReferenceEqualsDiagnosticAnalyzer.cs (1)
34var objectType = context.Compilation.GetSpecialType(SpecialType.System_Object);
src\Analyzers\Core\Analyzers\UseNullPropagation\AbstractUseNullPropagationDiagnosticAnalyzer.cs (5)
26ContainingType.OriginalDefinition.SpecialType: SpecialType.System_Nullable_T, 91var objectType = context.Compilation.GetSpecialType(SpecialType.System_Object); 158if (type is not INamedTypeSymbol namedType || namedType.ConstructedFrom.SpecialType != SpecialType.System_Nullable_T) 191var whenPartIsNullable = whenPartType?.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T; 373if (typeSymbol?.SpecialType == SpecialType.System_Object)
src\Analyzers\Core\Analyzers\UseNullPropagation\AbstractUseNullPropagationDiagnosticAnalyzer_IfStatement.cs (1)
118var whenPartIsNullable = semanticModel.GetTypeInfo(whenPartMatch).Type?.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T;
src\Analyzers\Core\Analyzers\ValidateFormatString\AbstractValidateFormatStringDiagnosticAnalyzer.cs (1)
303if (containingType.SpecialType != SpecialType.System_String)
src\Compilers\Core\Portable\SpecialTypeExtensions.cs (154)
17public static bool IsClrInteger(this SpecialType specialType) 21case SpecialType.System_Boolean: 22case SpecialType.System_Char: 23case SpecialType.System_Byte: 24case SpecialType.System_SByte: 25case SpecialType.System_Int16: 26case SpecialType.System_UInt16: 27case SpecialType.System_Int32: 28case SpecialType.System_UInt32: 29case SpecialType.System_Int64: 30case SpecialType.System_UInt64: 31case SpecialType.System_IntPtr: 32case SpecialType.System_UIntPtr: 42public static bool IsBlittable(this SpecialType specialType) 46case SpecialType.System_Boolean: 47case SpecialType.System_Char: 48case SpecialType.System_Byte: 49case SpecialType.System_SByte: 50case SpecialType.System_Int16: 51case SpecialType.System_UInt16: 52case SpecialType.System_Int32: 53case SpecialType.System_UInt32: 54case SpecialType.System_Int64: 55case SpecialType.System_UInt64: 56case SpecialType.System_Single: 57case SpecialType.System_Double: 64public static bool IsValueType(this SpecialType specialType) 68case SpecialType.System_Void: 69case SpecialType.System_Boolean: 70case SpecialType.System_Char: 71case SpecialType.System_Byte: 72case SpecialType.System_SByte: 73case SpecialType.System_Int16: 74case SpecialType.System_UInt16: 75case SpecialType.System_Int32: 76case SpecialType.System_UInt32: 77case SpecialType.System_Int64: 78case SpecialType.System_UInt64: 79case SpecialType.System_Single: 80case SpecialType.System_Double: 81case SpecialType.System_Decimal: 82case SpecialType.System_IntPtr: 83case SpecialType.System_UIntPtr: 84case SpecialType.System_Nullable_T: 85case SpecialType.System_DateTime: 86case SpecialType.System_TypedReference: 87case SpecialType.System_ArgIterator: 88case SpecialType.System_RuntimeArgumentHandle: 89case SpecialType.System_RuntimeFieldHandle: 90case SpecialType.System_RuntimeMethodHandle: 91case SpecialType.System_RuntimeTypeHandle: 98public static int SizeInBytes(this SpecialType specialType) 102case SpecialType.System_SByte: 104case SpecialType.System_Byte: 106case SpecialType.System_Int16: 108case SpecialType.System_UInt16: 110case SpecialType.System_Int32: 112case SpecialType.System_UInt32: 114case SpecialType.System_Int64: 116case SpecialType.System_UInt64: 118case SpecialType.System_Char: 120case SpecialType.System_Single: 122case SpecialType.System_Double: 124case SpecialType.System_Boolean: 127case SpecialType.System_Decimal: 141public static bool IsPrimitiveRecursiveStruct(this SpecialType specialType) 145case SpecialType.System_Boolean: 146case SpecialType.System_Byte: 147case SpecialType.System_Char: 148case SpecialType.System_Double: 149case SpecialType.System_Int16: 150case SpecialType.System_Int32: 151case SpecialType.System_Int64: 152case SpecialType.System_UInt16: 153case SpecialType.System_UInt32: 154case SpecialType.System_UInt64: 155case SpecialType.System_IntPtr: 156case SpecialType.System_UIntPtr: 157case SpecialType.System_SByte: 158case SpecialType.System_Single: 165public static bool IsValidEnumUnderlyingType(this SpecialType specialType) 169case SpecialType.System_Byte: 170case SpecialType.System_SByte: 171case SpecialType.System_Int16: 172case SpecialType.System_UInt16: 173case SpecialType.System_Int32: 174case SpecialType.System_UInt32: 175case SpecialType.System_Int64: 176case SpecialType.System_UInt64: 183public static bool IsNumericType(this SpecialType specialType) 187case SpecialType.System_Byte: 188case SpecialType.System_SByte: 189case SpecialType.System_Int16: 190case SpecialType.System_UInt16: 191case SpecialType.System_Int32: 192case SpecialType.System_UInt32: 193case SpecialType.System_Int64: 194case SpecialType.System_UInt64: 195case SpecialType.System_Single: 196case SpecialType.System_Double: 197case SpecialType.System_Decimal: 207public static bool IsIntegralType(this SpecialType specialType) 211case SpecialType.System_Byte: 212case SpecialType.System_SByte: 213case SpecialType.System_Int16: 214case SpecialType.System_UInt16: 215case SpecialType.System_Int32: 216case SpecialType.System_UInt32: 217case SpecialType.System_Int64: 218case SpecialType.System_UInt64: 225public static bool IsUnsignedIntegralType(this SpecialType specialType) 229case SpecialType.System_Byte: 230case SpecialType.System_UInt16: 231case SpecialType.System_UInt32: 232case SpecialType.System_UInt64: 239public static bool IsSignedIntegralType(this SpecialType specialType) 243case SpecialType.System_SByte: 244case SpecialType.System_Int16: 245case SpecialType.System_Int32: 246case SpecialType.System_Int64: 258public static int VBForToShiftBits(this SpecialType specialType) 262case SpecialType.System_SByte: 264case SpecialType.System_Int16: 266case SpecialType.System_Int32: 268case SpecialType.System_Int64: 275public static SpecialType FromRuntimeTypeOfLiteralValue(object value) 282return SpecialType.System_Int32; 287return SpecialType.System_String; 292return SpecialType.System_Boolean; 297return SpecialType.System_Char; 302return SpecialType.System_Int64; 307return SpecialType.System_Double; 312return SpecialType.System_UInt32; 317return SpecialType.System_UInt64; 322return SpecialType.System_Single; 327return SpecialType.System_Decimal; 332return SpecialType.System_Int16; 337return SpecialType.System_UInt16; 342return SpecialType.System_DateTime; 347return SpecialType.System_Byte; 352return SpecialType.System_SByte; 355return SpecialType.None; 365public static bool CanOptimizeBehavior(this SpecialType specialType) 366=> specialType is >= SpecialType.System_Object and <= SpecialType.System_Runtime_CompilerServices_InlineArrayAttribute; 371internal static ulong ConvertUnderlyingValueToUInt64(this SpecialType enumUnderlyingType, object value) 379SpecialType.System_SByte => (ulong)(sbyte)value, 380SpecialType.System_Int16 => (ulong)(short)value, 381SpecialType.System_Int32 => (ulong)(int)value, 382SpecialType.System_Int64 => (ulong)(long)value, 383SpecialType.System_Byte => (byte)value, 384SpecialType.System_UInt16 => (ushort)value, 385SpecialType.System_UInt32 => (uint)value, 386SpecialType.System_UInt64 => (ulong)value,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (2)
157type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T || 174if (type.SpecialType == SpecialType.System_String)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SemanticFacts\ISemanticFactsExtensions.cs (2)
119=> type?.SpecialType is SpecialType.System_Single or SpecialType.System_Double;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Simplification\SpecialTypeAnnotation.cs (8)
14private static readonly ConcurrentDictionary<SpecialType, string> s_fromSpecialTypes = new(); 15private static readonly ConcurrentDictionary<string, SpecialType> s_toSpecialTypes = new(); 17public static SyntaxAnnotation Create(SpecialType specialType) 20public static SpecialType GetSpecialType(SyntaxAnnotation annotation) 23private static string CreateFromSpecialTypes(SpecialType arg) 26private static SpecialType CreateToSpecialTypes(string arg) 27=> (SpecialType)Enum.Parse(typeof(SpecialType), arg);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.NamedTypeSymbolKey.cs (1)
26visitor.WriteBoolean(symbol.SpecialType == SpecialType.System_IntPtr);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (6)
758&& symbol.ContainingType.SpecialType == SpecialType.System_Object 1017if (newReceiverType.SpecialType != SpecialType.None) 1024return newSymbolContainingType.SpecialType is SpecialType.System_Array or 1025SpecialType.System_Delegate or 1026SpecialType.System_Enum or 1027SpecialType.System_String;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (9)
58private static object CreateOne(SpecialType specialType) 61SpecialType.System_SByte => (sbyte)1, 62SpecialType.System_Byte => (byte)1, 63SpecialType.System_Int16 => (short)1, 64SpecialType.System_UInt16 => (ushort)1, 65SpecialType.System_Int32 => 1, 66SpecialType.System_UInt32 => (uint)1, 67SpecialType.System_Int64 => (long)1, 68SpecialType.System_UInt64 => (ulong)1,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IntegerUtilities.cs (7)
60public static long Convert(long v, SpecialType type) 63SpecialType.System_SByte => unchecked((sbyte)v), 64SpecialType.System_Byte => unchecked((byte)v), 65SpecialType.System_Int16 => unchecked((short)v), 66SpecialType.System_UInt16 => unchecked((ushort)v), 67SpecialType.System_Int32 => unchecked((int)v), 68SpecialType.System_UInt32 => unchecked((uint)v),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\IMethodSymbolExtensions.cs (2)
46method.Parameters is [{ Type.SpecialType: SpecialType.System_Object }, var secondParam] && 107methodSymbol.ReturnType.SpecialType == SpecialType.System_Int32 ||
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (1)
664ContainingType.SpecialType: SpecialType.System_Object,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (4)
512.Select(p => (p.Type ?? compilation.GetSpecialType(SpecialType.System_Object)).WithNullableAnnotation(p.NullableAnnotation)); 517types = types.Concat((method.ReturnType ?? compilation.GetSpecialType(SpecialType.System_Object)).WithNullableAnnotation(method.ReturnNullableAnnotation)); 680if (!returnType.GetMembers().OfType<IPropertySymbol>().Any(p => p.Name == WellKnownMemberNames.IsCompleted && p.Type.SpecialType == SpecialType.System_Boolean && p.GetMethod != null)) 730ReturnType.SpecialType: SpecialType.System_Boolean,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (56)
55=> symbol?.SpecialType == SpecialType.System_Void; 58=> symbol?.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T; 268case SpecialType.System_Array or SpecialType.System_ValueType: 271case SpecialType.System_Delegate: 272case SpecialType.System_MulticastDelegate: 273case SpecialType.System_Enum: 286case SpecialType.System_Byte: 287case SpecialType.System_SByte: 288case SpecialType.System_Int16: 289case SpecialType.System_UInt16: 290case SpecialType.System_Int32: 291case SpecialType.System_UInt32: 292case SpecialType.System_Int64: 293case SpecialType.System_UInt64: 294case SpecialType.System_Single: 295case SpecialType.System_Double: 296case SpecialType.System_Decimal: 297case SpecialType.System_IntPtr when type.IsNativeIntegerType: 298case SpecialType.System_UIntPtr when type.IsNativeIntegerType: 374case SpecialType.System_Object: 375case SpecialType.System_Void: 376case SpecialType.System_Boolean: 377case SpecialType.System_SByte: 378case SpecialType.System_Byte: 379case SpecialType.System_Decimal: 380case SpecialType.System_Single: 381case SpecialType.System_Double: 382case SpecialType.System_Int16: 383case SpecialType.System_Int32: 384case SpecialType.System_Int64: 385case SpecialType.System_Char: 386case SpecialType.System_String: 387case SpecialType.System_UInt16: 388case SpecialType.System_UInt32: 389case SpecialType.System_UInt64: 390case SpecialType.System_IntPtr when symbol.IsNativeIntegerType: 391case SpecialType.System_UIntPtr when symbol.IsNativeIntegerType: 402typeSymbol.AllInterfaces.Any(static i => i.SpecialType == SpecialType.System_Collections_IEnumerable) && 651case SpecialType.System_Boolean: 652case SpecialType.System_Char: 653case SpecialType.System_SByte: 654case SpecialType.System_Byte: 655case SpecialType.System_Int16: 656case SpecialType.System_UInt16: 657case SpecialType.System_Int32: 658case SpecialType.System_UInt32: 659case SpecialType.System_Int64: 660case SpecialType.System_UInt64: 661case SpecialType.System_Decimal: 662case SpecialType.System_Single: 663case SpecialType.System_Double: 666case SpecialType.System_IntPtr: 667case SpecialType.System_UIntPtr: 670case SpecialType.System_DateTime: 759namedType.OriginalDefinition.GetAttributes().Any(static a => a.AttributeClass?.SpecialType == SpecialType.System_Runtime_CompilerServices_InlineArrayAttribute);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\PredefinedTypeExtensions.cs (41)
13public static SpecialType ToSpecialType(this PredefinedType predefinedType) 16PredefinedType.Object => SpecialType.System_Object, 17PredefinedType.Void => SpecialType.System_Void, 18PredefinedType.Boolean => SpecialType.System_Boolean, 19PredefinedType.Char => SpecialType.System_Char, 20PredefinedType.SByte => SpecialType.System_SByte, 21PredefinedType.Byte => SpecialType.System_Byte, 22PredefinedType.Int16 => SpecialType.System_Int16, 23PredefinedType.UInt16 => SpecialType.System_UInt16, 24PredefinedType.Int32 => SpecialType.System_Int32, 25PredefinedType.UInt32 => SpecialType.System_UInt32, 26PredefinedType.Int64 => SpecialType.System_Int64, 27PredefinedType.UInt64 => SpecialType.System_UInt64, 28PredefinedType.Decimal => SpecialType.System_Decimal, 29PredefinedType.Single => SpecialType.System_Single, 30PredefinedType.Double => SpecialType.System_Double, 31PredefinedType.String => SpecialType.System_String, 32PredefinedType.DateTime => SpecialType.System_DateTime, 33PredefinedType.IntPtr => SpecialType.System_IntPtr, 34PredefinedType.UIntPtr => SpecialType.System_UIntPtr, 35_ => SpecialType.None, 38public static PredefinedType ToPredefinedType(this SpecialType specialType) 41SpecialType.System_Object => PredefinedType.Object, 42SpecialType.System_Void => PredefinedType.Void, 43SpecialType.System_Boolean => PredefinedType.Boolean, 44SpecialType.System_Char => PredefinedType.Char, 45SpecialType.System_SByte => PredefinedType.SByte, 46SpecialType.System_Byte => PredefinedType.Byte, 47SpecialType.System_Int16 => PredefinedType.Int16, 48SpecialType.System_UInt16 => PredefinedType.UInt16, 49SpecialType.System_Int32 => PredefinedType.Int32, 50SpecialType.System_UInt32 => PredefinedType.UInt32, 51SpecialType.System_Int64 => PredefinedType.Int64, 52SpecialType.System_UInt64 => PredefinedType.UInt64, 53SpecialType.System_Decimal => PredefinedType.Decimal, 54SpecialType.System_Single => PredefinedType.Single, 55SpecialType.System_Double => PredefinedType.Double, 56SpecialType.System_String => PredefinedType.String, 57SpecialType.System_DateTime => PredefinedType.DateTime, 58SpecialType.System_IntPtr => PredefinedType.IntPtr, 59SpecialType.System_UIntPtr => PredefinedType.UIntPtr,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.cs (1)
198=> symbol.IsKind(SymbolKind.NamedType, out ITypeSymbol? typeSymbol) && typeSymbol.SpecialType == SpecialType.System_Object;
Microsoft.CodeAnalysis.CodeStyle.Fixes (97)
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.State.cs (9)
378case SpecialType.System_Boolean: 379case SpecialType.System_Byte: 380case SpecialType.System_Char: 381case SpecialType.System_Int16: 382case SpecialType.System_Int32: 383case SpecialType.System_Int64: 384case SpecialType.System_Double: 385case SpecialType.System_Single: 386case SpecialType.System_String:
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateDeconstructMethodService.State.cs (1)
75returnType: semanticModel.Compilation.GetSpecialType(SpecialType.System_Void),
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.cs (1)
61if (typeParameters.Length == 0 && returnType.SpecialType != SpecialType.System_Void)
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.State.cs (1)
444inferredType = inferredType.SpecialType == SpecialType.System_Void
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementHelpers.cs (1)
251var idisposable = compilation.GetSpecialType(SpecialType.System_IDisposable);
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator.cs (1)
273var condition3 = typeParameter.HasReferenceTypeConstraint && typeParameter.ConstraintTypes.Any(static ts => ts.IsReferenceType && ts.SpecialType != SpecialType.System_Object);
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator_DisposePattern.cs (2)
175compilation.GetSpecialType(SpecialType.System_Boolean), 238var boolType = compilation.GetSpecialType(SpecialType.System_Boolean);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractFlagsEnumGenerator.cs (5)
15protected abstract SyntaxNode CreateExplicitlyCastedLiteralValue(INamedTypeSymbol enumType, SpecialType underlyingSpecialType, object constantValue); 78var underlyingSpecialType = enumType.EnumUnderlyingType.SpecialType; 138IFieldSymbol field, INamedTypeSymbol enumType, SpecialType underlyingSpecialType) 172var underlyingSpecialType = enumType.EnumUnderlyingType.SpecialType; 188var underlyingSpecialType = enumType.EnumUnderlyingType.SpecialType;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (12)
83public static bool IsSpecialType([NotNullWhen(true)] ITypeSymbol? type, SpecialType specialType) 136SpecialType.System_SByte => value is sbyte, 137SpecialType.System_Byte => value is byte, 138SpecialType.System_Int16 => value is short, 139SpecialType.System_UInt16 => value is ushort, 140SpecialType.System_Int32 => value is int, 141SpecialType.System_UInt32 => value is uint, 142SpecialType.System_Int64 => value is long, 143SpecialType.System_UInt64 => value is ulong, 144SpecialType.System_Decimal => value is decimal, 145SpecialType.System_Single => value is float, 146SpecialType.System_Double => value is double,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationSymbolFactory.cs (5)
422SpecialType specialType = SpecialType.None, 441SpecialType specialType = SpecialType.None, 493specialType: SpecialType.None,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\LiteralSpecialValues.cs (11)
16public static bool HasSpecialValues(SpecialType specialType) 20case SpecialType.System_SByte: 21case SpecialType.System_Int16: 22case SpecialType.System_UInt16: 23case SpecialType.System_Int32: 24case SpecialType.System_UInt32: 25case SpecialType.System_Int64: 26case SpecialType.System_UInt64: 27case SpecialType.System_Single: 28case SpecialType.System_Double: 29case SpecialType.System_Decimal:
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationAbstractNamedTypeSymbol.cs (1)
29SpecialType specialType,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationArrayTypeSymbol.cs (1)
10internal sealed class CodeGenerationArrayTypeSymbol(ITypeSymbol elementType, int rank, NullableAnnotation nullableAnnotation) : CodeGenerationTypeSymbol(null, null, default, Accessibility.NotApplicable, default, string.Empty, SpecialType.None, nullableAnnotation), IArrayTypeSymbol
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationMethodSymbol.cs (1)
75=> this.ReturnType == null || this.ReturnType.SpecialType == SpecialType.System_Void;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationNamedTypeSymbol.cs (1)
34SpecialType specialType,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationPointerTypeSymbol.cs (1)
9internal sealed class CodeGenerationPointerTypeSymbol(ITypeSymbol pointedAtType) : CodeGenerationTypeSymbol(null, null, default, Accessibility.NotApplicable, default, string.Empty, SpecialType.None, NullableAnnotation.None), IPointerTypeSymbol
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationTypeParameterSymbol.cs (1)
24int ordinal) : CodeGenerationTypeSymbol(containingType?.ContainingAssembly, containingType, attributes, Accessibility.NotApplicable, default, name, SpecialType.None, nullableAnnotation), ITypeParameterSymbol
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationTypeSymbol.cs (2)
19SpecialType specialType, 23public SpecialType SpecialType { get; protected set; } = specialType;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (1)
85_ => compilation.GetSpecialType(SpecialType.System_Object),
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (19)
50returnType: compilation.GetSpecialType(SpecialType.System_Boolean), 55parameters: [CodeGenerationSymbolFactory.CreateParameterSymbol(compilation.GetSpecialType(SpecialType.System_Object).WithNullableAnnotation(NullableAnnotation.Annotated), ObjName)], 411case SpecialType.System_Boolean: 412case SpecialType.System_Char: 413case SpecialType.System_SByte: 414case SpecialType.System_Byte: 415case SpecialType.System_Int16: 416case SpecialType.System_UInt16: 417case SpecialType.System_Int32: 418case SpecialType.System_UInt32: 419case SpecialType.System_Int64: 420case SpecialType.System_UInt64: 421case SpecialType.System_Decimal: 422case SpecialType.System_Single: 423case SpecialType.System_Double: 424case SpecialType.System_String: 425case SpecialType.System_DateTime: 443method.ReturnType.SpecialType == SpecialType.System_Boolean && 444method.Parameters[0].Type.SpecialType == SpecialType.System_Object &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateGetHashCodeMethod.cs (4)
136? factory.SimpleLocalDeclarationStatement(generatorInternal, compilation.GetSpecialType(SpecialType.System_Int32), HashCodeName, CreateLiteralExpression(factory, initHash)) 137: factory.LocalDeclarationStatement(compilation.GetSpecialType(SpecialType.System_Int64), HashCodeName, CreateLiteralExpression(factory, initHash))); 166compilation.GetSpecialType(SpecialType.System_Int32), 210method.ReturnType.SpecialType == SpecialType.System_Int32 &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (12)
60SpecialType? patternValueType, 184else if (operation is IIsTypeOperation { TypeOperand.SpecialType: SpecialType.System_Object } && generatorInternal.SupportsPatterns(semanticModel.SyntaxTree.Options)) 305SpecialType? patternValueType) 307if (patternValueType is SpecialType specialType && specialType.IsNumericType()) 447if (containingType?.SpecialType == SpecialType.System_Array || 448containingType?.SpecialType == SpecialType.System_String) 458case SpecialType.System_Byte: 459case SpecialType.System_UInt16: 460case SpecialType.System_UInt32: 461case SpecialType.System_UInt64: 497SpecialType? patternValueType) 504if (patternValueType == SpecialType.System_Boolean)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.AbstractTypeInferrer.cs (2)
78protected IEnumerable<TypeInferenceInfo> CreateResult(SpecialType type, NullableAnnotation nullableAnnotation = NullableAnnotation.None) 120symbol.ContainingType?.SpecialType == SpecialType.System_Enum;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.cs (1)
46? [semanticModel.Compilation.GetSpecialType(SpecialType.System_Boolean)]
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\SimplificationHelpers.cs (1)
78if (specialType != SpecialType.None)
Microsoft.CodeAnalysis.CSharp (2082)
Binder\Binder.ValueChecks.cs (3)
729if ((expr.ConstantValueOpt != null) || (expr.Type.GetSpecialTypeSafe() == SpecialType.System_Void)) 3437if (expr.Type?.GetSpecialTypeSafe() == SpecialType.System_Void) 3753if (expr.Type?.GetSpecialTypeSafe() == SpecialType.System_Void)
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 (11)
270GetSpecialType(SpecialType.System_ValueType, diagnostics, typeSyntax); 522case SpecialType.System_Enum: 523case SpecialType.System_Delegate: 524case SpecialType.System_MulticastDelegate: 533else if (type.SpecialType != SpecialType.System_Enum) 566case SpecialType.System_Enum: 570case SpecialType.System_Delegate: 571case SpecialType.System_MulticastDelegate: 575case SpecialType.System_Object: 576case SpecialType.System_ValueType: 577case SpecialType.System_Array:
Binder\Binder_Conversions.cs (221)
191Debug.Assert(destination.SpecialType != SpecialType.System_String); 656Debug.Assert(((NamedTypeSymbol)readOnlySpanType).TypeArgumentsWithAnnotationsNoUseSiteDiagnostics[0].SpecialType is SpecialType.System_Char); 669Parameters: [{ Type.SpecialType: SpecialType.System_String }] 2203destination.SpecialType == SpecialType.System_Object; 2353SpecialType.System_Decimal => WellKnownMember.System_Runtime_CompilerServices_DecimalConstantAttribute__ctor, 2354SpecialType.System_DateTime => WellKnownMember.System_Runtime_CompilerServices_DateTimeConstantAttribute__ctor, 3172case SpecialType.System_Single: 3174case SpecialType.System_Double: 3218SpecialType destinationType; 3223Debug.Assert(underlyingType.SpecialType != SpecialType.None); 3245else if (destinationType == SpecialType.System_Decimal) 3270else if (destinationType == SpecialType.System_IntPtr || destinationType == SpecialType.System_UIntPtr) 3282private static object DoUncheckedConversion(SpecialType destinationType, ConstantValue value) 3317case SpecialType.System_Byte: return (byte)byteValue; 3318case SpecialType.System_Char: return (char)byteValue; 3319case SpecialType.System_UInt16: return (ushort)byteValue; 3320case SpecialType.System_UInt32: return (uint)byteValue; 3321case SpecialType.System_UInt64: return (ulong)byteValue; 3322case SpecialType.System_SByte: return (sbyte)byteValue; 3323case SpecialType.System_Int16: return (short)byteValue; 3324case SpecialType.System_Int32: return (int)byteValue; 3325case SpecialType.System_Int64: return (long)byteValue; 3326case SpecialType.System_IntPtr: return (int)byteValue; 3327case SpecialType.System_UIntPtr: return (uint)byteValue; 3328case SpecialType.System_Single: 3329case SpecialType.System_Double: return (double)byteValue; 3330case SpecialType.System_Decimal: return (decimal)byteValue; 3337case SpecialType.System_Byte: return (byte)charValue; 3338case SpecialType.System_Char: return (char)charValue; 3339case SpecialType.System_UInt16: return (ushort)charValue; 3340case SpecialType.System_UInt32: return (uint)charValue; 3341case SpecialType.System_UInt64: return (ulong)charValue; 3342case SpecialType.System_SByte: return (sbyte)charValue; 3343case SpecialType.System_Int16: return (short)charValue; 3344case SpecialType.System_Int32: return (int)charValue; 3345case SpecialType.System_Int64: return (long)charValue; 3346case SpecialType.System_IntPtr: return (int)charValue; 3347case SpecialType.System_UIntPtr: return (uint)charValue; 3348case SpecialType.System_Single: 3349case SpecialType.System_Double: return (double)charValue; 3350case SpecialType.System_Decimal: return (decimal)charValue; 3357case SpecialType.System_Byte: return (byte)uint16Value; 3358case SpecialType.System_Char: return (char)uint16Value; 3359case SpecialType.System_UInt16: return (ushort)uint16Value; 3360case SpecialType.System_UInt32: return (uint)uint16Value; 3361case SpecialType.System_UInt64: return (ulong)uint16Value; 3362case SpecialType.System_SByte: return (sbyte)uint16Value; 3363case SpecialType.System_Int16: return (short)uint16Value; 3364case SpecialType.System_Int32: return (int)uint16Value; 3365case SpecialType.System_Int64: return (long)uint16Value; 3366case SpecialType.System_IntPtr: return (int)uint16Value; 3367case SpecialType.System_UIntPtr: return (uint)uint16Value; 3368case SpecialType.System_Single: 3369case SpecialType.System_Double: return (double)uint16Value; 3370case SpecialType.System_Decimal: return (decimal)uint16Value; 3377case SpecialType.System_Byte: return (byte)uint32Value; 3378case SpecialType.System_Char: return (char)uint32Value; 3379case SpecialType.System_UInt16: return (ushort)uint32Value; 3380case SpecialType.System_UInt32: return (uint)uint32Value; 3381case SpecialType.System_UInt64: return (ulong)uint32Value; 3382case SpecialType.System_SByte: return (sbyte)uint32Value; 3383case SpecialType.System_Int16: return (short)uint32Value; 3384case SpecialType.System_Int32: return (int)uint32Value; 3385case SpecialType.System_Int64: return (long)uint32Value; 3386case SpecialType.System_IntPtr: return (int)uint32Value; 3387case SpecialType.System_UIntPtr: return (uint)uint32Value; 3388case SpecialType.System_Single: return (double)(float)uint32Value; 3389case SpecialType.System_Double: return (double)uint32Value; 3390case SpecialType.System_Decimal: return (decimal)uint32Value; 3397case SpecialType.System_Byte: return (byte)uint64Value; 3398case SpecialType.System_Char: return (char)uint64Value; 3399case SpecialType.System_UInt16: return (ushort)uint64Value; 3400case SpecialType.System_UInt32: return (uint)uint64Value; 3401case SpecialType.System_UInt64: return (ulong)uint64Value; 3402case SpecialType.System_SByte: return (sbyte)uint64Value; 3403case SpecialType.System_Int16: return (short)uint64Value; 3404case SpecialType.System_Int32: return (int)uint64Value; 3405case SpecialType.System_Int64: return (long)uint64Value; 3406case SpecialType.System_IntPtr: return (int)uint64Value; 3407case SpecialType.System_UIntPtr: return (uint)uint64Value; 3408case SpecialType.System_Single: return (double)(float)uint64Value; 3409case SpecialType.System_Double: return (double)uint64Value; 3410case SpecialType.System_Decimal: return (decimal)uint64Value; 3417case SpecialType.System_Byte: return (byte)nuintValue; 3418case SpecialType.System_Char: return (char)nuintValue; 3419case SpecialType.System_UInt16: return (ushort)nuintValue; 3420case SpecialType.System_UInt32: return (uint)nuintValue; 3421case SpecialType.System_UInt64: return (ulong)nuintValue; 3422case SpecialType.System_SByte: return (sbyte)nuintValue; 3423case SpecialType.System_Int16: return (short)nuintValue; 3424case SpecialType.System_Int32: return (int)nuintValue; 3425case SpecialType.System_Int64: return (long)nuintValue; 3426case SpecialType.System_IntPtr: return (int)nuintValue; 3427case SpecialType.System_Single: return (double)(float)nuintValue; 3428case SpecialType.System_Double: return (double)nuintValue; 3429case SpecialType.System_Decimal: return (decimal)nuintValue; 3436case SpecialType.System_Byte: return (byte)sbyteValue; 3437case SpecialType.System_Char: return (char)sbyteValue; 3438case SpecialType.System_UInt16: return (ushort)sbyteValue; 3439case SpecialType.System_UInt32: return (uint)sbyteValue; 3440case SpecialType.System_UInt64: return (ulong)sbyteValue; 3441case SpecialType.System_SByte: return (sbyte)sbyteValue; 3442case SpecialType.System_Int16: return (short)sbyteValue; 3443case SpecialType.System_Int32: return (int)sbyteValue; 3444case SpecialType.System_Int64: return (long)sbyteValue; 3445case SpecialType.System_IntPtr: return (int)sbyteValue; 3446case SpecialType.System_UIntPtr: return (uint)sbyteValue; 3447case SpecialType.System_Single: 3448case SpecialType.System_Double: return (double)sbyteValue; 3449case SpecialType.System_Decimal: return (decimal)sbyteValue; 3456case SpecialType.System_Byte: return (byte)int16Value; 3457case SpecialType.System_Char: return (char)int16Value; 3458case SpecialType.System_UInt16: return (ushort)int16Value; 3459case SpecialType.System_UInt32: return (uint)int16Value; 3460case SpecialType.System_UInt64: return (ulong)int16Value; 3461case SpecialType.System_SByte: return (sbyte)int16Value; 3462case SpecialType.System_Int16: return (short)int16Value; 3463case SpecialType.System_Int32: return (int)int16Value; 3464case SpecialType.System_Int64: return (long)int16Value; 3465case SpecialType.System_IntPtr: return (int)int16Value; 3466case SpecialType.System_UIntPtr: return (uint)int16Value; 3467case SpecialType.System_Single: 3468case SpecialType.System_Double: return (double)int16Value; 3469case SpecialType.System_Decimal: return (decimal)int16Value; 3476case SpecialType.System_Byte: return (byte)int32Value; 3477case SpecialType.System_Char: return (char)int32Value; 3478case SpecialType.System_UInt16: return (ushort)int32Value; 3479case SpecialType.System_UInt32: return (uint)int32Value; 3480case SpecialType.System_UInt64: return (ulong)int32Value; 3481case SpecialType.System_SByte: return (sbyte)int32Value; 3482case SpecialType.System_Int16: return (short)int32Value; 3483case SpecialType.System_Int32: return (int)int32Value; 3484case SpecialType.System_Int64: return (long)int32Value; 3485case SpecialType.System_IntPtr: return (int)int32Value; 3486case SpecialType.System_UIntPtr: return (uint)int32Value; 3487case SpecialType.System_Single: return (double)(float)int32Value; 3488case SpecialType.System_Double: return (double)int32Value; 3489case SpecialType.System_Decimal: return (decimal)int32Value; 3496case SpecialType.System_Byte: return (byte)int64Value; 3497case SpecialType.System_Char: return (char)int64Value; 3498case SpecialType.System_UInt16: return (ushort)int64Value; 3499case SpecialType.System_UInt32: return (uint)int64Value; 3500case SpecialType.System_UInt64: return (ulong)int64Value; 3501case SpecialType.System_SByte: return (sbyte)int64Value; 3502case SpecialType.System_Int16: return (short)int64Value; 3503case SpecialType.System_Int32: return (int)int64Value; 3504case SpecialType.System_Int64: return (long)int64Value; 3505case SpecialType.System_IntPtr: return (int)int64Value; 3506case SpecialType.System_UIntPtr: return (uint)int64Value; 3507case SpecialType.System_Single: return (double)(float)int64Value; 3508case SpecialType.System_Double: return (double)int64Value; 3509case SpecialType.System_Decimal: return (decimal)int64Value; 3516case SpecialType.System_Byte: return (byte)nintValue; 3517case SpecialType.System_Char: return (char)nintValue; 3518case SpecialType.System_UInt16: return (ushort)nintValue; 3519case SpecialType.System_UInt32: return (uint)nintValue; 3520case SpecialType.System_UInt64: return (ulong)nintValue; 3521case SpecialType.System_SByte: return (sbyte)nintValue; 3522case SpecialType.System_Int16: return (short)nintValue; 3523case SpecialType.System_Int32: return (int)nintValue; 3524case SpecialType.System_Int64: return (long)nintValue; 3525case SpecialType.System_IntPtr: return (int)nintValue; 3526case SpecialType.System_UIntPtr: return (uint)nintValue; 3527case SpecialType.System_Single: return (double)(float)nintValue; 3528case SpecialType.System_Double: return (double)nintValue; 3529case SpecialType.System_Decimal: return (decimal)nintValue; 3540case SpecialType.System_Byte: return (byte)doubleValue; 3541case SpecialType.System_Char: return (char)doubleValue; 3542case SpecialType.System_UInt16: return (ushort)doubleValue; 3543case SpecialType.System_UInt32: return (uint)doubleValue; 3544case SpecialType.System_UInt64: return (ulong)doubleValue; 3545case SpecialType.System_SByte: return (sbyte)doubleValue; 3546case SpecialType.System_Int16: return (short)doubleValue; 3547case SpecialType.System_Int32: return (int)doubleValue; 3548case SpecialType.System_Int64: return (long)doubleValue; 3549case SpecialType.System_IntPtr: return (int)doubleValue; 3550case SpecialType.System_UIntPtr: return (uint)doubleValue; 3551case SpecialType.System_Single: return (double)(float)doubleValue; 3552case SpecialType.System_Double: return (double)doubleValue; 3553case SpecialType.System_Decimal: return (value.Discriminator == ConstantValueTypeDiscriminator.Single) ? (decimal)(float)doubleValue : (decimal)doubleValue; 3560case SpecialType.System_Byte: return (byte)decimalValue; 3561case SpecialType.System_Char: return (char)decimalValue; 3562case SpecialType.System_UInt16: return (ushort)decimalValue; 3563case SpecialType.System_UInt32: return (uint)decimalValue; 3564case SpecialType.System_UInt64: return (ulong)decimalValue; 3565case SpecialType.System_SByte: return (sbyte)decimalValue; 3566case SpecialType.System_Int16: return (short)decimalValue; 3567case SpecialType.System_Int32: return (int)decimalValue; 3568case SpecialType.System_Int64: return (long)decimalValue; 3569case SpecialType.System_IntPtr: return (int)decimalValue; 3570case SpecialType.System_UIntPtr: return (uint)decimalValue; 3571case SpecialType.System_Single: return (double)(float)decimalValue; 3572case SpecialType.System_Double: return (double)decimalValue; 3573case SpecialType.System_Decimal: return (decimal)decimalValue; 3585public static bool CheckConstantBounds(SpecialType destinationType, ConstantValue value, out bool maySucceedAtRuntime) 3603private static bool CheckConstantBounds(SpecialType destinationType, double value, out bool maySucceedAtRuntime) 3611case SpecialType.System_Byte: return (byte.MinValue - 1D) < value && value < (byte.MaxValue + 1D); 3612case SpecialType.System_Char: return (char.MinValue - 1D) < value && value < (char.MaxValue + 1D); 3613case SpecialType.System_UInt16: return (ushort.MinValue - 1D) < value && value < (ushort.MaxValue + 1D); 3614case SpecialType.System_UInt32: return (uint.MinValue - 1D) < value && value < (uint.MaxValue + 1D); 3615case SpecialType.System_UInt64: return (ulong.MinValue - 1D) < value && value < (ulong.MaxValue + 1D); 3616case SpecialType.System_SByte: return (sbyte.MinValue - 1D) < value && value < (sbyte.MaxValue + 1D); 3617case SpecialType.System_Int16: return (short.MinValue - 1D) < value && value < (short.MaxValue + 1D); 3618case SpecialType.System_Int32: return (int.MinValue - 1D) < value && value < (int.MaxValue + 1D); 3620case SpecialType.System_Int64: return (long.MinValue - 1D) <= value && value < (long.MaxValue + 1D); 3621case SpecialType.System_Decimal: return ((double)decimal.MinValue - 1D) < value && value < ((double)decimal.MaxValue + 1D); 3622case SpecialType.System_IntPtr: 3625case SpecialType.System_UIntPtr: 3633private static bool CheckConstantBounds(SpecialType destinationType, decimal value, out bool maySucceedAtRuntime) 3641case SpecialType.System_Byte: return (byte.MinValue - 1M) < value && value < (byte.MaxValue + 1M); 3642case SpecialType.System_Char: return (char.MinValue - 1M) < value && value < (char.MaxValue + 1M); 3643case SpecialType.System_UInt16: return (ushort.MinValue - 1M) < value && value < (ushort.MaxValue + 1M); 3644case SpecialType.System_UInt32: return (uint.MinValue - 1M) < value && value < (uint.MaxValue + 1M); 3645case SpecialType.System_UInt64: return (ulong.MinValue - 1M) < value && value < (ulong.MaxValue + 1M); 3646case SpecialType.System_SByte: return (sbyte.MinValue - 1M) < value && value < (sbyte.MaxValue + 1M); 3647case SpecialType.System_Int16: return (short.MinValue - 1M) < value && value < (short.MaxValue + 1M); 3648case SpecialType.System_Int32: return (int.MinValue - 1M) < value && value < (int.MaxValue + 1M); 3649case SpecialType.System_Int64: return (long.MinValue - 1M) < value && value < (long.MaxValue + 1M); 3650case SpecialType.System_IntPtr: 3653case SpecialType.System_UIntPtr:
Binder\Binder_Crefs.cs (2)
556builder.Add(this.GetSpecialType(memberName == "nint" ? SpecialType.System_IntPtr : SpecialType.System_UIntPtr, diagnostics, syntax).AsNativeInteger());
Binder\Binder_Deconstruct.cs (2)
126var voidType = GetSpecialType(SpecialType.System_Void, diagnostics, node); 694if (deconstructMethod.ReturnType.GetSpecialTypeSafe() != SpecialType.System_Void)
Binder\Binder_Expressions.cs (72)
1044if (boundArgument.Type?.SpecialType == SpecialType.System_Void) 1227TypeSymbol typedReferenceType = this.Compilation.GetSpecialType(SpecialType.System_TypedReference); 1251TypeSymbol typedReferenceType = GetSpecialType(SpecialType.System_TypedReference, diagnostics, node); 1275TypeSymbol typedReferenceType = this.Compilation.GetSpecialType(SpecialType.System_TypedReference); 1317TypeSymbol runtimeArgumentHandleType = GetSpecialType(SpecialType.System_RuntimeArgumentHandle, diagnostics, node); 1442this.GetSpecialType(SpecialType.System_Int32, diagnostics, node), hasErrors); 2609GetSpecialType(SpecialType.System_Boolean, diagnostics, node); 2612TypeSymbol intType = GetSpecialType(SpecialType.System_Int32, diagnostics, node); 2619NamedTypeSymbol nullableType = GetSpecialType(SpecialType.System_Nullable_T, diagnostics, node); 2697GetSpecialType(SpecialType.System_Boolean, diagnostics, node); 2699NamedTypeSymbol nullableType = GetSpecialType(SpecialType.System_Nullable_T, diagnostics, node); 2726NamedTypeSymbol nullableType = GetSpecialType(SpecialType.System_Nullable_T, diagnostics, operand); 4374this.Compilation.CreateArrayTypeSymbol(GetSpecialType(SpecialType.System_Object, diagnostics, node)), 4475GetSpecialType(SpecialType.System_Int32, diagnostics, nonNullSyntax)) 4556count = GenerateConversionForAssignment(GetSpecialType(SpecialType.System_Int32, diagnostics, node), count, diagnostics); 4700GetSpecialType(SpecialType.System_Int32, diagnostics, node)) 4721if (constantValue == null || constantValue.IsBad || expression.Type.SpecialType != SpecialType.System_Int32) 4744var type = expression.Type.SpecialType; 4745if (type == SpecialType.System_Int32) 4750if (type == SpecialType.System_Int64) 4757Debug.Assert(type == SpecialType.System_UInt32 || type == SpecialType.System_UInt64); 4861containingType.SpecialType == SpecialType.System_Object || 4864if ((object)initializerType == null || containingType.SpecialType == SpecialType.System_Object) //e.g. when defining System.Object in source 5112if (baseType.SpecialType == SpecialType.System_Object) 5114if (resultMember is null || resultMember.ContainingType.SpecialType != SpecialType.System_Object) 5313lengthOrCount = new BoundLiteral(expression.Syntax, ConstantValue.Create(length), @this.GetSpecialType(SpecialType.System_Int32, diagnostics, expression.Syntax)) { WasCompilerGenerated = true }; 6304NamedTypeSymbol collectionsIEnumerableType = this.GetSpecialType(SpecialType.System_Collections_IEnumerable, diagnostics, node); 6485type: GetSpecialType(SpecialType.System_Void, diagnostics, elementInitializer), 7307var specialType = type.SpecialType; 7316case SpecialType.System_SByte: 7317case SpecialType.System_Int16: 7318case SpecialType.System_Int32: 7319case SpecialType.System_Int64: 7320case SpecialType.System_Byte: 7321case SpecialType.System_UInt16: 7322case SpecialType.System_UInt32: 7323case SpecialType.System_UInt64: 7324case SpecialType.System_Single: 7325case SpecialType.System_Double: 7326case SpecialType.System_Decimal: 7327case SpecialType.System_Boolean: 7328case SpecialType.System_Char: 7373specialType != SpecialType.None && 7374specialType != SpecialType.System_Byte && 7375specialType != SpecialType.System_SByte && 7376specialType != SpecialType.System_Int16 && 7377specialType != SpecialType.System_UInt16); 7404var type = GetWellKnownType(WellKnownType.System_ReadOnlySpan_T, diagnostics, node).Construct(GetSpecialType(SpecialType.System_Byte, diagnostics, node)); 9455BoundExpression convertedIndex = TryImplicitConversionToArrayIndex(index, SpecialType.System_Int32, node, diagnostics); 9543if (convertedIndex.ConstantValueOpt is { SpecialType: SpecialType.System_Int32, Int32Value: int constIndex }) 9624if (hatExpression.Operand.ConstantValueOpt is { SpecialType: SpecialType.System_Int32, Int32Value: int constIndex }) 9630else if (convertedIndex is BoundConversion { Operand: { ConstantValueOpt: { SpecialType: SpecialType.System_Int32, Int32Value: int constIndex } } operand }) 9637arguments[0] is { ConstantValueOpt: { SpecialType: SpecialType.System_Int32, Int32Value: int constIndex1 } } index && 9638arguments[1] is { ConstantValueOpt: { SpecialType: SpecialType.System_Boolean, BooleanValue: bool isFromEnd } }) 9759var int32 = GetSpecialType(SpecialType.System_Int32, diagnostics, node); 9794TryImplicitConversionToArrayIndex(index, SpecialType.System_Int32, node, diagnostics) ?? 9795TryImplicitConversionToArrayIndex(index, SpecialType.System_UInt32, node, diagnostics) ?? 9796TryImplicitConversionToArrayIndex(index, SpecialType.System_Int64, node, diagnostics) ?? 9797TryImplicitConversionToArrayIndex(index, SpecialType.System_UInt64, node, diagnostics); 9831NamedTypeSymbol int32 = GetSpecialType(SpecialType.System_Int32, diagnostics, node); 9865private BoundExpression TryImplicitConversionToArrayIndex(BoundExpression expr, SpecialType specialType, SyntaxNode node, BindingDiagnosticBag diagnostics) 10425original.Parameters[0] is { Type.SpecialType: SpecialType.System_Int32, RefKind: RefKind.None }) 10427var intPlaceholder = new BoundImplicitIndexerValuePlaceholder(syntax, Compilation.GetSpecialType(SpecialType.System_Int32)) { WasCompilerGenerated = true }; 10443else if (receiver.Type.SpecialType == SpecialType.System_String) 10498var startArgumentPlaceholder = new BoundImplicitIndexerValuePlaceholder(syntax, Compilation.GetSpecialType(SpecialType.System_Int32)) { WasCompilerGenerated = true }; 10499var lengthArgumentPlaceholder = new BoundImplicitIndexerValuePlaceholder(syntax, Compilation.GetSpecialType(SpecialType.System_Int32)) { WasCompilerGenerated = true }; 10525original.Parameters[0] is { Type.SpecialType: SpecialType.System_Int32, RefKind: RefKind.None } && 10526original.Parameters[1] is { Type.SpecialType: SpecialType.System_Int32, RefKind: RefKind.None }; 10588getMethod.ReturnType.SpecialType == SpecialType.System_Int32 && 11382accessType = GetSpecialType(SpecialType.System_Void, diagnostics, node); 11390accessType = GetSpecialType(SpecialType.System_Nullable_T, diagnostics, node).Construct(accessType);
Binder\Binder_InterpolatedString.cs (18)
41var stringType = GetSpecialType(SpecialType.System_String, diagnostics, node); 55var intType = GetSpecialType(SpecialType.System_Int32, diagnostics, node); 167var constantValue = ConstantValue.Create(text, SpecialType.System_String); 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 || 414expressions[0] = new BoundLiteral(syntax, ConstantValue.Create(formatString.ToStringAndFree()), GetSpecialType(Microsoft.CodeAnalysis.SpecialType.System_String, diagnostics, syntax)) { WasCompilerGenerated = true }; 436=> parts.All(p => p is BoundLiteral or BoundStringInsert { Value.Type.SpecialType: SpecialType.System_String, Alignment: null, Format: null }); 517var @string = GetSpecialType(SpecialType.System_String, diagnostics, rootSyntax); 674TypeSymbol objectType = GetSpecialType(SpecialType.System_Object, diagnostics, syntax); 711var intType = GetSpecialType(SpecialType.System_Int32, diagnostics, syntax); 722var boolType = GetSpecialType(SpecialType.System_Boolean, diagnostics, syntax); 853var objectType = GetSpecialType(SpecialType.System_Object, diagnostics, unconvertedInterpolatedString.Syntax); 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) 998var expected = builderPatternExpectsBool == true ? Compilation.GetSpecialType(SpecialType.System_Boolean) : Compilation.GetSpecialType(SpecialType.System_Void);
Binder\Binder_Invocation.cs (13)
269TypeSymbol objType = GetSpecialType(SpecialType.System_Object, diagnostics, node); 1424Debug.Assert(parameterType.IsDynamic() || parameterType.SpecialType == SpecialType.System_Object); 1686defaultValue = new BoundLiteral(syntax, ConstantValue.Create(line), Compilation.GetSpecialType(SpecialType.System_Int32)) { WasCompilerGenerated = true }; 1691defaultValue = new BoundLiteral(syntax, ConstantValue.Create(path), Compilation.GetSpecialType(SpecialType.System_String)) { WasCompilerGenerated = true }; 1696defaultValue = new BoundLiteral(syntax, ConstantValue.Create(memberName), Compilation.GetSpecialType(SpecialType.System_String)) { WasCompilerGenerated = true }; 1700&& Conversions.ClassifyBuiltInConversion(Compilation.GetSpecialType(SpecialType.System_String), parameterType, isChecked: false, ref discardedUseSiteInfo).Exists 1705defaultValue = new BoundLiteral(syntax, ConstantValue.Create(argument.Syntax.ToString()), Compilation.GetSpecialType(SpecialType.System_String)) { WasCompilerGenerated = true }; 1710if (parameterType.IsDynamic() || parameterType.SpecialType == SpecialType.System_Object) 1730if (InAttributeArgument && parameterType.SpecialType == SpecialType.System_Object) 1741if (!conversion.IsValid && defaultConstantValue is { SpecialType: SpecialType.System_Decimal or SpecialType.System_DateTime }) 1781TypeSymbol int32Type = GetSpecialType(SpecialType.System_Int32, diagnostics, node); 2349return new BoundNameOfOperator(node, boundArgument, ConstantValue.Create(name), Compilation.GetSpecialType(SpecialType.System_String));
Binder\Binder_Lookup.cs (10)
1058var iFaceSpecial = iFaceOriginal.SpecialType; 1061return iFaceSpecial == SpecialType.System_Collections_Generic_IEnumerable_T || 1062iFaceSpecial == SpecialType.System_Collections_Generic_IList_T || 1063iFaceSpecial == SpecialType.System_Collections_Generic_ICollection_T || 1065iFaceSpecial == SpecialType.System_Collections_Generic_IReadOnlyList_T || 1066iFaceSpecial == SpecialType.System_Collections_Generic_IReadOnlyCollection_T || 1068iFaceSpecial == SpecialType.System_Collections_IEnumerable || 1249this.LookupMembersInClass(tmp, this.Compilation.GetSpecialType(SpecialType.System_Object), name, arity, basesBeingResolved, options, originalBinder, type, diagnose, ref useSiteInfo); 1342hiddenContainer.SpecialType != SpecialType.System_Object) 2121this.AddMemberLookupSymbolsInfoInClass(result, Compilation.GetSpecialType(SpecialType.System_Object), options, originalBinder, accessThroughType);
Binder\Binder_Operators.cs (44)
549return ResultIsUsed(node) ? leftType : GetSpecialType(SpecialType.System_Void, diagnostics, node); 688type = this.GetSpecialType(SpecialType.System_Void, diagnostics, node); //we know the return type would have been void 721type = this.GetSpecialType(SpecialType.System_Void, diagnostics, node); 941return new BoundLiteral(node, ConstantValue.Create(kind == BinaryOperatorKind.Equal), GetSpecialType(SpecialType.System_Boolean, diagnostics, node)); 956Debug.Assert(right.Type.SpecialType == SpecialType.System_String); 1169GetSpecialType(SpecialType.System_Boolean, diagnostics, node)); 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; 1555var booleanType = Compilation.GetSpecialType(SpecialType.System_Boolean); 1940return GetSpecialType(SpecialType.System_Boolean, diagnostics, node); 2252(operand.Type.SpecialType == SpecialType.System_UInt64 || isNuint(operand.Type))) 2282return type.SpecialType == SpecialType.System_UIntPtr 2533internal static SpecialType GetEnumPromotedType(SpecialType underlyingType) 2537case SpecialType.System_Byte: 2538case SpecialType.System_SByte: 2539case SpecialType.System_Int16: 2540case SpecialType.System_UInt16: 2541return SpecialType.System_Int32; 2543case SpecialType.System_Int32: 2544case SpecialType.System_UInt32: 2545case SpecialType.System_Int64: 2546case SpecialType.System_UInt64: 2583SpecialType operandSpecialType = GetEnumPromotedType(underlyingType.SpecialType); 2609Debug.Assert(resultTypeSymbol.SpecialType == SpecialType.System_Boolean); 2618if (resultTypeSymbol.SpecialType != SpecialType.System_Boolean && constantValue != null && !constantValue.IsBad) 2678SpecialType resultType = resultTypeSymbol.SpecialType; 3507return mode == InstanceUserDefinedIncrementUsageMode.ResultIsUsed ? operandType : GetSpecialType(SpecialType.System_Void, diagnostics, node); 4246var upconvertSpecialType = GetEnumPromotedType(underlyingType.SpecialType); 4295SpecialType resultType = resultTypeSymbol.SpecialType; 4531return new BoundLiteral(node, ConstantValue.Create((int)-2147483648), GetSpecialType(SpecialType.System_Int32, diagnostics, node)); 4546return new BoundLiteral(node, ConstantValue.Create(-9223372036854775808), GetSpecialType(SpecialType.System_Int64, diagnostics, node)); 4646var resultType = (TypeSymbol)GetSpecialType(SpecialType.System_Boolean, diagnostics, node); 4743GetSpecialType(SpecialType.System_Object, diagnostics, node).Name // a pretty way of getting the string "Object" 4752operandType = GetSpecialType(SpecialType.System_Object, diagnostics, node); 4937if (operandType.IsValueType && targetType.IsClassType() && targetType.SpecialType != SpecialType.System_Enum || 4938targetType.IsValueType && operandType.IsClassType() && operandType.SpecialType != SpecialType.System_Enum) 5221type: GetSpecialType(SpecialType.System_Object, diagnostics, node)); 5239operandType = GetSpecialType(SpecialType.System_Object, diagnostics, node); 5246targetType = GetSpecialType(SpecialType.System_Object, diagnostics, node); 5476var objectType = GetSpecialType(SpecialType.System_Object, diagnostics, node);
Binder\Binder_Patterns.cs (28)
42node, expression, pattern, GetSpecialType(SpecialType.System_Boolean, diagnostics, node), 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()) 825expressionType = conversions.CorLibrary.GetSpecialType(SpecialType.System_Object); 1115var objectType = Compilation.GetSpecialType(SpecialType.System_Object); 1142var objectType = Compilation.GetSpecialType(SpecialType.System_Object); 1261if (declType != (object)Compilation.GetSpecialType(SpecialType.System_Object) && 1491if (memberType.SpecialType == SpecialType.System_Int32 && 1620bool isExplicitNotNullTest = patternType.Type.SpecialType == SpecialType.System_Object; 1698SpecialType.System_Single => BinaryOperatorKind.Float, 1699SpecialType.System_Double => BinaryOperatorKind.Double, 1700SpecialType.System_Char => BinaryOperatorKind.Char, 1701SpecialType.System_SByte => BinaryOperatorKind.Int, // operands are converted to int 1702SpecialType.System_Byte => BinaryOperatorKind.Int, // operands are converted to int 1703SpecialType.System_UInt16 => BinaryOperatorKind.Int, // operands are converted to int 1704SpecialType.System_Int16 => BinaryOperatorKind.Int, // operands are converted to int 1705SpecialType.System_Int32 => BinaryOperatorKind.Int, 1706SpecialType.System_UInt32 => BinaryOperatorKind.UInt, 1707SpecialType.System_Int64 => BinaryOperatorKind.Long, 1708SpecialType.System_UInt64 => BinaryOperatorKind.ULong, 1709SpecialType.System_Decimal => BinaryOperatorKind.Decimal, 1710SpecialType.System_String => BinaryOperatorKind.String, 1711SpecialType.System_Boolean => BinaryOperatorKind.Bool, 1712SpecialType.System_IntPtr when type.IsNativeIntegerType => BinaryOperatorKind.NInt, 1713SpecialType.System_UIntPtr when type.IsNativeIntegerType => BinaryOperatorKind.NUInt,
Binder\Binder_QueryErrors.cs (2)
89var ienumerable_t = Compilation.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T); 127var ienumerable = Compilation.GetSpecialType(SpecialType.System_Collections_IEnumerable);
Binder\Binder_Statements.cs (11)
1278if (initializerType.SpecialType == SpecialType.System_String && 1279((object)fixedPatternMethod == null || fixedPatternMethod.ContainingType.SpecialType != SpecialType.System_String)) 1282elementType = this.GetSpecialType(SpecialType.System_Char, diagnostics, initializerSyntax); 1529type = this.GetSpecialType(SpecialType.System_Void, diagnostics, node); 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); 2656var boolean = GetSpecialType(SpecialType.System_Boolean, diagnostics, node); 3531else if (expression.Type?.SpecialType == SpecialType.System_Void) 3844if (baseType.SpecialType == SpecialType.System_Object)
Binder\Binder_Symbols.cs (9)
1001var specialType = 1002node.IsNint ? SpecialType.System_IntPtr : 1003node.IsNuint ? SpecialType.System_UIntPtr : SpecialType.None; 1005if (specialType == SpecialType.None) 1068this.GetSpecialType(SpecialType.System_Boolean, diagnostics, node); 1697internal NamedTypeSymbol GetSpecialType(SpecialType typeId, BindingDiagnosticBag diagnostics, SyntaxNode node) 1702internal static NamedTypeSymbol GetSpecialType(CSharpCompilation compilation, SpecialType typeId, SyntaxNode node, BindingDiagnosticBag diagnostics) 1710internal static NamedTypeSymbol GetSpecialType(CSharpCompilation compilation, SpecialType typeId, Location location, BindingDiagnosticBag diagnostics)
Binder\Binder_TupleOperators.cs (3)
33TypeSymbol resultType = GetSpecialType(SpecialType.System_Boolean, diagnostics, node); 131TypeSymbol boolean = GetSpecialType(SpecialType.System_Boolean, diagnostics, node); 420NamedTypeSymbol nullableT = GetSpecialType(SpecialType.System_Nullable_T, diagnostics, syntax);
Binder\DecisionDagBuilder.cs (56)
326var objectType = this._compilation.GetSpecialType(SpecialType.System_Object); 328RoslynDebug.Assert(getLengthProperty.Type.SpecialType == SpecialType.System_Int32); 342var lengthTemp = new BoundDagTemp(syntax, this._compilation.GetSpecialType(SpecialType.System_Int32), lengthEvaluation); 464if (input.Type.IsDynamic() ? type.SpecialType == SpecialType.System_Object : conversion.IsImplicit) 1564case (SpecialType.System_SByte, SpecialType.System_Byte): 1565case (SpecialType.System_Byte, SpecialType.System_SByte): 1566case (SpecialType.System_Int16, SpecialType.System_UInt16): 1567case (SpecialType.System_UInt16, SpecialType.System_Int16): 1568case (SpecialType.System_Int32, SpecialType.System_UInt32): 1569case (SpecialType.System_UInt32, SpecialType.System_Int32): 1570case (SpecialType.System_Int64, SpecialType.System_UInt64): 1571case (SpecialType.System_UInt64, SpecialType.System_Int64): 1572case (SpecialType.System_IntPtr, SpecialType.System_UIntPtr): 1573case (SpecialType.System_UIntPtr, SpecialType.System_IntPtr): 1578case (SpecialType.System_Int32, SpecialType.System_IntPtr): 1579case (SpecialType.System_Int32, SpecialType.System_UIntPtr): 1580case (SpecialType.System_UInt32, SpecialType.System_IntPtr): 1581case (SpecialType.System_UInt32, SpecialType.System_UIntPtr): 1582case (SpecialType.System_IntPtr, SpecialType.System_Int32): 1583case (SpecialType.System_IntPtr, SpecialType.System_UInt32): 1584case (SpecialType.System_UIntPtr, SpecialType.System_Int32): 1585case (SpecialType.System_UIntPtr, SpecialType.System_UInt32): 1590case (SpecialType.System_Int64, SpecialType.System_IntPtr): 1591case (SpecialType.System_Int64, SpecialType.System_UIntPtr): 1592case (SpecialType.System_UInt64, SpecialType.System_IntPtr): 1593case (SpecialType.System_UInt64, SpecialType.System_UIntPtr): 1594case (SpecialType.System_IntPtr, SpecialType.System_Int64): 1595case (SpecialType.System_IntPtr, SpecialType.System_UInt64): 1596case (SpecialType.System_UIntPtr, SpecialType.System_Int64): 1597case (SpecialType.System_UIntPtr, SpecialType.System_UInt64):
Binder\DecisionDagBuilder_ListPatterns.cs (1)
44var lengthTemp = new BoundDagTemp(syntax, _compilation.GetSpecialType(SpecialType.System_Int32), lengthEvaluation);
Binder\ForEachLoopBinder.cs (22)
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) 703inferredType = TypeWithAnnotations.Create(GetSpecialType(SpecialType.System_Char, diagnostics, collectionExpr.Syntax)); 1012if (!isAsync && collectionExprType.SpecialType == SpecialType.System_String) 1090this.Compilation.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T)); 1128Debug.Assert(collectionType.OriginalDefinition.SpecialType == SpecialType.System_Collections_Generic_IEnumerable_T); 1187Debug.Assert(collectionType.SpecialType == SpecialType.System_Collections_IEnumerable); 1192builder.ElementTypeWithAnnotations = builder.CurrentPropertyGetter?.ReturnTypeWithAnnotations ?? TypeWithAnnotations.Create(GetSpecialType(SpecialType.System_Object, diagnostics, errorLocationSyntax)); 1195builder.GetEnumeratorInfo.Method.ReturnType.SpecialType == SpecialType.System_Collections_IEnumerator); 1288NamedTypeSymbol targetInterface = isAsync ? this.Compilation.GetWellKnownType(WellKnownType.System_IAsyncDisposable) : this.Compilation.GetSpecialType(SpecialType.System_IDisposable); 1310builder.CollectionType = GetSpecialType(SpecialType.System_Collections_IEnumerable, diagnostics, syntax); 1317GetSpecialType(SpecialType.System_Object, diagnostics, syntax)); 1321builder.ElementTypeWithAnnotations = collectionExprType.SpecialType == SpecialType.System_String ? 1322TypeWithAnnotations.Create(GetSpecialType(SpecialType.System_Char, diagnostics, syntax)) : 1334TypeSymbol.Equals(builder.GetEnumeratorInfo.Method.ReturnType, this.Compilation.GetSpecialType(SpecialType.System_Collections_IEnumerator), TypeCompareKind.ConsiderEverything2)); 1758return moveNextMethodCandidate.OriginalDefinition.ReturnType.SpecialType != SpecialType.System_Boolean; 1776case SpecialType.System_Collections_IEnumerable: 1777case SpecialType.System_Collections_Generic_IEnumerable_T: 1818var implementedNonGeneric = this.Compilation.GetSpecialType(SpecialType.System_Collections_IEnumerable); 1897return type.SpecialType == SpecialType.System_Collections_Generic_IEnumerable_T;
Binder\InContainerBinder.cs (1)
102return TypeWithAnnotations.Create(this.Compilation.GetSpecialType(SpecialType.System_Object));
Binder\InMethodBinder.cs (5)
154case SpecialType.System_Collections_IEnumerable: 155case SpecialType.System_Collections_IEnumerator: 156var objectType = compilation.GetSpecialType(SpecialType.System_Object); 163case SpecialType.System_Collections_Generic_IEnumerable_T: 164case SpecialType.System_Collections_Generic_IEnumerator_T:
Binder\PatternExplainer.cs (28)
674if (underlyingType.SpecialType == SpecialType.System_IntPtr) 682else if (underlyingType.SpecialType == SpecialType.System_UIntPtr) 700SpecialType.System_Int32 => true, 701SpecialType.System_Int64 => true, 702SpecialType.System_UInt32 => true, 703SpecialType.System_UInt64 => true, 704SpecialType.System_String => true, 705SpecialType.System_Decimal => true, 706SpecialType.System_Single => true, 707SpecialType.System_Double => true, 708SpecialType.System_Boolean => true, 709SpecialType.System_Char => true, 721case SpecialType.System_Boolean: 722case SpecialType.System_Byte: 723case SpecialType.System_SByte: 724case SpecialType.System_UInt16: 725case SpecialType.System_Int16: 726case SpecialType.System_Int32: 727case SpecialType.System_UInt32: 728case SpecialType.System_UInt64: 729case SpecialType.System_Int64: 730case SpecialType.System_IntPtr when type.IsNativeIntegerType: 731case SpecialType.System_UIntPtr when type.IsNativeIntegerType: 732case SpecialType.System_Decimal: 733case SpecialType.System_Char: 734case SpecialType.System_String: 737case SpecialType.System_Single: 746case SpecialType.System_Double:
Binder\RefSafetyAnalysis.cs (3)
240return placeholder.Type?.SpecialType == SpecialType.System_Int32; 765Debug.Assert(placeholder.Type.SpecialType == SpecialType.System_Boolean); 966Debug.Assert(node.ArgumentPlaceholders.All(p => p is BoundImplicitIndexerValuePlaceholder { Type.SpecialType: SpecialType.System_Int32 }));
Binder\Semantics\Conversions\Conversions.cs (3)
80SpecialType.System_Decimal => WellKnownMember.System_Runtime_CompilerServices_DecimalConstantAttribute__ctor, 81SpecialType.System_DateTime => WellKnownMember.System_Runtime_CompilerServices_DateTimeConstantAttribute__ctor, 437TypeWithAnnotations.Create(compilation.GetSpecialType(SpecialType.System_Object), customModifiers: parameter.TypeWithAnnotations.CustomModifiers), parameter.RefCustomModifiers,
Binder\Semantics\Conversions\ConversionsBase.cs (85)
250var sourceIsVoid = source?.SpecialType == SpecialType.System_Void; 251var destIsVoid = destination.SpecialType == SpecialType.System_Void; 1363var specialSource = source.Type.GetSpecialTypeSafe(); 1365if (specialSource == SpecialType.System_Int32) 1371case SpecialType.System_Byte: 1373case SpecialType.System_SByte: 1375case SpecialType.System_Int16: 1377case SpecialType.System_IntPtr when destination.IsNativeIntegerType: 1379case SpecialType.System_UInt32: 1380case SpecialType.System_UIntPtr when destination.IsNativeIntegerType: 1382case SpecialType.System_UInt64: 1384case SpecialType.System_UInt16: 1390else if (specialSource == SpecialType.System_Int64 && destination.GetSpecialTypeSafe() == SpecialType.System_UInt64 && (constantValue.IsBad || 0 <= constantValue.Int64Value)) 1619var multicastDelegateType = corLibrary.GetSpecialType(SpecialType.System_MulticastDelegate); 1679else if (implementsSpecialInterface(compilation, destination, SpecialType.System_Collections_IEnumerable)) 1698static bool implementsSpecialInterface(CSharpCompilation compilation, TypeSymbol targetType, SpecialType specialInterface) 1756TypeSymbol expectedAttributeType = corLibrary.GetSpecialType(SpecialType.System_Int32); 1783TypeSymbol expectedAttributeType = corLibrary.GetSpecialType(SpecialType.System_String); 2101case SpecialType.System_Char: 2102case SpecialType.System_SByte: 2103case SpecialType.System_Byte: 2104case SpecialType.System_Int16: 2105case SpecialType.System_UInt16: 2106case SpecialType.System_Int32: 2107case SpecialType.System_UInt32: 2108case SpecialType.System_Int64: 2109case SpecialType.System_UInt64: 2110case SpecialType.System_Single: 2111case SpecialType.System_Double: 2112case SpecialType.System_Decimal: 2113case SpecialType.System_IntPtr when type.IsNativeIntegerType: 2114case SpecialType.System_UIntPtr when type.IsNativeIntegerType: 2186case SpecialType.System_SByte: 2187case SpecialType.System_Byte: 2188case SpecialType.System_Int16: 2189case SpecialType.System_UInt16: 2190case SpecialType.System_Char: 2191case SpecialType.System_Int32: 2192case SpecialType.System_UInt32: 2193case SpecialType.System_Int64: 2194case SpecialType.System_UInt64: 2195case SpecialType.System_Double: 2196case SpecialType.System_Single: 2197case SpecialType.System_Decimal: 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) 2737if (destination.GetSpecialTypeSafe() == SpecialType.System_Array) 2742if (IsBaseInterface(destination, this.corLibrary.GetDeclaredSpecialType(SpecialType.System_Array), ref useSiteInfo)) 2775var specialDestination = destination.GetSpecialTypeSafe(); 2777if (specialDestination == SpecialType.System_MulticastDelegate || 2778specialDestination == SpecialType.System_Delegate || 2779IsBaseInterface(destination, this.corLibrary.GetDeclaredSpecialType(SpecialType.System_MulticastDelegate), ref useSiteInfo)) 2808if (destination.SpecialType == SpecialType.System_MulticastDelegate) 2818var derivedType = this.corLibrary.GetDeclaredSpecialType(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) 3645if (HasImplicitConversionToInterface(this.corLibrary.GetDeclaredSpecialType(SpecialType.System_Delegate), source, ref useSiteInfo)) 3747if (source.SpecialType == SpecialType.System_Array) 3752foreach (var iface in this.corLibrary.GetDeclaredSpecialType(SpecialType.System_Array).AllInterfacesWithDefinitionUseSiteDiagnostics(ref useSiteInfo)) 3781var specialDefinition = ((TypeSymbol)source.OriginalDefinition).SpecialType; 3783if (specialDefinition == SpecialType.System_Collections_Generic_IList_T || 3784specialDefinition == SpecialType.System_Collections_Generic_ICollection_T || 3785specialDefinition == SpecialType.System_Collections_Generic_IEnumerable_T || 3786specialDefinition == SpecialType.System_Collections_Generic_IReadOnlyList_T || 3787specialDefinition == SpecialType.System_Collections_Generic_IReadOnlyCollection_T) 3830var specialTypeSource = source.SpecialType; 3832if (specialTypeSource == SpecialType.System_Object || specialTypeSource == SpecialType.System_ValueType) 3851if (source.SpecialType == SpecialType.System_Enum && destination.IsEnumType()) 3924case SpecialType.System_SByte: 3925case SpecialType.System_Byte: 3926case SpecialType.System_Int16: 3927case SpecialType.System_UInt16: 3928case SpecialType.System_Int32: 3929case SpecialType.System_UInt32: 3930case SpecialType.System_Int64: 3931case SpecialType.System_UInt64: 3933case SpecialType.System_IntPtr: 3934case SpecialType.System_UIntPtr: 3992return spanElementType.SpecialType is SpecialType.System_Char;
Binder\Semantics\Conversions\UserDefinedImplicitConversions.cs (1)
887var nullable = this.corLibrary.GetDeclaredSpecialType(SpecialType.System_Nullable_T);
Binder\Semantics\Operators\BinaryOperatorEasyOut.cs (3)
354if (left.Type.SpecialType == SpecialType.System_Int32 || 355left.Type.SpecialType == SpecialType.System_Boolean || 356left.Type.SpecialType == SpecialType.System_String)
Binder\Semantics\Operators\BinaryOperatorOverloadResolution.cs (26)
325operators.Add(new BinaryOperatorSignature(kind | BinaryOperatorKind.Delegate, delegateType, delegateType, Compilation.GetSpecialType(SpecialType.System_Boolean))); 393TypeSymbol systemDelegateType = _binder.Compilation.GetSpecialType(SpecialType.System_Delegate); 489Debug.Assert(underlying.SpecialType != SpecialType.None); 540var boolean = Compilation.GetSpecialType(SpecialType.System_Boolean); 564operators.Add(new BinaryOperatorSignature(BinaryOperatorKind.PointerAndIntAddition, pointerType, Compilation.GetSpecialType(SpecialType.System_Int32), pointerType)); 565operators.Add(new BinaryOperatorSignature(BinaryOperatorKind.PointerAndUIntAddition, pointerType, Compilation.GetSpecialType(SpecialType.System_UInt32), pointerType)); 566operators.Add(new BinaryOperatorSignature(BinaryOperatorKind.PointerAndLongAddition, pointerType, Compilation.GetSpecialType(SpecialType.System_Int64), pointerType)); 567operators.Add(new BinaryOperatorSignature(BinaryOperatorKind.PointerAndULongAddition, pointerType, Compilation.GetSpecialType(SpecialType.System_UInt64), pointerType)); 568operators.Add(new BinaryOperatorSignature(BinaryOperatorKind.IntAndPointerAddition, Compilation.GetSpecialType(SpecialType.System_Int32), pointerType, pointerType)); 569operators.Add(new BinaryOperatorSignature(BinaryOperatorKind.UIntAndPointerAddition, Compilation.GetSpecialType(SpecialType.System_UInt32), pointerType, pointerType)); 570operators.Add(new BinaryOperatorSignature(BinaryOperatorKind.LongAndPointerAddition, Compilation.GetSpecialType(SpecialType.System_Int64), pointerType, pointerType)); 571operators.Add(new BinaryOperatorSignature(BinaryOperatorKind.ULongAndPointerAddition, Compilation.GetSpecialType(SpecialType.System_UInt64), pointerType, pointerType)); 574operators.Add(new BinaryOperatorSignature(BinaryOperatorKind.PointerAndIntSubtraction, pointerType, Compilation.GetSpecialType(SpecialType.System_Int32), pointerType)); 575operators.Add(new BinaryOperatorSignature(BinaryOperatorKind.PointerAndUIntSubtraction, pointerType, Compilation.GetSpecialType(SpecialType.System_UInt32), pointerType)); 576operators.Add(new BinaryOperatorSignature(BinaryOperatorKind.PointerAndLongSubtraction, pointerType, Compilation.GetSpecialType(SpecialType.System_Int64), pointerType)); 577operators.Add(new BinaryOperatorSignature(BinaryOperatorKind.PointerAndULongSubtraction, pointerType, Compilation.GetSpecialType(SpecialType.System_UInt64), pointerType)); 578operators.Add(new BinaryOperatorSignature(BinaryOperatorKind.PointerSubtraction, pointerType, pointerType, Compilation.GetSpecialType(SpecialType.System_Int64))); 595var voidPointerType = new PointerTypeSymbol(TypeWithAnnotations.Create(Compilation.GetSpecialType(SpecialType.System_Void))); 596operators.Add(new BinaryOperatorSignature(kind | BinaryOperatorKind.Pointer, voidPointerType, voidPointerType, Compilation.GetSpecialType(SpecialType.System_Boolean))); 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)); 798var @object = Compilation.GetSpecialType(SpecialType.System_Object); 799operators.Add(new BinaryOperatorSignature(kind | BinaryOperatorKind.Object, @object, @object, Compilation.GetSpecialType(SpecialType.System_Boolean))); 1082return result.SpecialType == SpecialType.System_Boolean ?
Binder\Semantics\Operators\OperatorFacts.cs (23)
34case SpecialType.System_Array: 35case SpecialType.System_Boolean: 36case SpecialType.System_Byte: 37case SpecialType.System_Char: 38case SpecialType.System_Decimal: 39case SpecialType.System_Delegate: 40case SpecialType.System_Double: 41case SpecialType.System_Enum: 42case SpecialType.System_Int16: 43case SpecialType.System_Int32: 44case SpecialType.System_Int64: 45case SpecialType.System_IntPtr when type.IsNativeIntegerType: 46case SpecialType.System_UIntPtr when type.IsNativeIntegerType: 47case SpecialType.System_MulticastDelegate: 48case SpecialType.System_Object: 49case SpecialType.System_SByte: 50case SpecialType.System_Single: 51case SpecialType.System_String: 52case SpecialType.System_UInt16: 53case SpecialType.System_UInt32: 54case SpecialType.System_UInt64: 55case SpecialType.System_ValueType: 56case SpecialType.System_Void:
Binder\Semantics\Operators\OperatorKindExtensions.cs (10)
147public static BinaryOperatorKind WithType(this BinaryOperatorKind kind, SpecialType type) 152case SpecialType.System_Int32: 154case SpecialType.System_UInt32: 156case SpecialType.System_Int64: 158case SpecialType.System_UInt64: 165public static UnaryOperatorKind WithType(this UnaryOperatorKind kind, SpecialType type) 170case SpecialType.System_Int32: 172case SpecialType.System_UInt32: 174case SpecialType.System_Int64: 176case SpecialType.System_UInt64:
Binder\Semantics\Operators\UnaryOperatorOverloadResolution.cs (1)
21return Compilation.GetSpecialType(SpecialType.System_Nullable_T).Construct(type);
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (2)
1419if (!returnType.HasType || returnType.SpecialType == SpecialType.System_Void) 1474if (!sourceReturnType.HasType || sourceReturnType.SpecialType == SpecialType.System_Void)
Binder\Semantics\OverloadResolution\OverloadResolution.cs (16)
204members.All(static m => m.ContainingSymbol is NamedTypeSymbol { BaseTypeNoUseSiteDiagnostics.SpecialType: SpecialType.System_Object })); 1644if (type.SpecialType == SpecialType.System_Object && currentType.SpecialType != SpecialType.System_Object) 1706if (type.IsClassType() && type.GetSpecialTypeSafe() != SpecialType.System_Object) 2816t1.IsDynamic() && t2.SpecialType == SpecialType.System_Object || 2817t2.IsDynamic() && t1.SpecialType == SpecialType.System_Object); 3800case SpecialType.System_SByte: 3801case SpecialType.System_Int16: 3802case SpecialType.System_Int32: 3803case SpecialType.System_Int64: 3804case SpecialType.System_IntPtr when type.IsNativeIntegerType: 3821case SpecialType.System_Byte: 3822case SpecialType.System_UInt16: 3823case SpecialType.System_UInt32: 3824case SpecialType.System_UInt64: 3825case SpecialType.System_UIntPtr when type.IsNativeIntegerType:
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)
Binder\UsingStatementBinder.cs (1)
302: originalBinder.Compilation.GetSpecialType(SpecialType.System_IDisposable);
BoundTree\BoundInlineArrayAccess.cs (1)
19{ SpecialType: SpecialType.System_Int32 } or
BoundTree\UnboundLambda.cs (3)
782returnType = TypeWithAnnotations.Create(Binder.Compilation.GetSpecialType(SpecialType.System_Void)); 985? TypeWithAnnotations.Create(this.Binder.Compilation.GetSpecialType(SpecialType.System_Void)) 1233? this.Binder.Compilation.GetSpecialType(SpecialType.System_Void)
CodeGen\EmitArrayInitializer.cs (16)
442SpecialType specialElementType = SpecialType.None; 684if (elementType.IsReferenceType && elementType.SpecialType != SpecialType.System_String) 790internal static bool IsTypeAllowedInBlobWrapper(SpecialType type) => type is 794SpecialType.System_SByte or SpecialType.System_Byte or SpecialType.System_Boolean or 800SpecialType.System_Int16 or SpecialType.System_UInt16 or SpecialType.System_Char or 803SpecialType.System_Int32 or SpecialType.System_UInt32 or SpecialType.System_Single or 806SpecialType.System_Int64 or SpecialType.System_UInt64 or SpecialType.System_Double;
CodeGen\EmitConversion.cs (4)
385if (parameters[0].Type.SpecialType != SpecialType.System_Object) continue; 386var p1t = parameters[1].Type.SpecialType; 387if (p1t == SpecialType.System_IntPtr || p1t == SpecialType.System_UIntPtr)
CodeGen\EmitExpression.cs (33)
53(expression.Type.SpecialType != SpecialType.System_Decimal && 1139Debug.Assert(!field.IsConst || field.ContainingType.SpecialType == SpecialType.System_Decimal, 1336case SpecialType.System_Byte: 1338case SpecialType.System_Int16: 1340case SpecialType.System_Int32: 1342case SpecialType.System_Int64: 1344case SpecialType.System_Char: 1346case SpecialType.System_Boolean: 1348case SpecialType.System_SByte: 1350case SpecialType.System_UInt16: 1352case SpecialType.System_UInt32: 1354case SpecialType.System_UInt64: 1356case SpecialType.System_IntPtr: 1358case SpecialType.System_UIntPtr: 1360case SpecialType.System_Single: 1362case SpecialType.System_Double: 1364case SpecialType.System_RuntimeTypeHandle: 1366case SpecialType.System_RuntimeFieldHandle: 1368case SpecialType.System_RuntimeMethodHandle: 1370case SpecialType.System_RuntimeArgumentHandle: 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 || 3533Debug.Assert(node.Type.SpecialType == SpecialType.System_Int32); 3550Debug.Assert(node.Type.SpecialType == SpecialType.System_Int32); 3564Debug.Assert(node.Type.SpecialType == SpecialType.System_Int32); 3587Debug.Assert(node.Type.SpecialType == SpecialType.System_Int32); 3666Debug.Assert(node.Type.SpecialType == SpecialType.System_Int32);
CodeGen\EmitOperators.cs (23)
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; 681case SpecialType.System_Byte: 684case SpecialType.System_SByte: 687case SpecialType.System_Int16: 690case SpecialType.System_UInt16: 763private static bool IsUnsigned(SpecialType type) 767case SpecialType.System_Byte: 768case SpecialType.System_UInt16: 769case SpecialType.System_UInt32: 770case SpecialType.System_UInt64:
CodeGen\EmitStatement.cs (8)
1050_module.GetSpecialType(SpecialType.System_Object, catchBlock.Syntax, _diagnostics.DiagnosticBag); 1308expression.Type.SpecialType == SpecialType.System_String || expression.Type.IsSpanOrReadOnlySpanChar()); 1311if (expression.Type.SpecialType == SpecialType.System_String || expression.Type.IsSpanOrReadOnlySpanChar()) 1393var int32Type = Binder.GetSpecialType(_module.Compilation, SpecialType.System_Int32, syntaxNode, _diagnostics); 1421var charType = Binder.GetSpecialType(_module.Compilation, SpecialType.System_Char, syntaxNode, _diagnostics); 1524var UInt32Type = Binder.GetSpecialType(_module.Compilation, SpecialType.System_UInt32, syntaxNode, _diagnostics); 1545var sequenceEqualsCharMethod = sequenceEqualsTMethod.Construct(Binder.GetSpecialType(_module.Compilation, SpecialType.System_Char, syntaxNode, _diagnostics)); 1806? _module.GetSpecialType(SpecialType.System_IntPtr, syntaxNode, _diagnostics.DiagnosticBag)
Compilation\BuiltInOperators.cs (54)
264case UnaryOperatorKind.SByte: opType = _compilation.GetSpecialType(SpecialType.System_SByte); break; 265case UnaryOperatorKind.Byte: opType = _compilation.GetSpecialType(SpecialType.System_Byte); break; 266case UnaryOperatorKind.Short: opType = _compilation.GetSpecialType(SpecialType.System_Int16); break; 267case UnaryOperatorKind.UShort: opType = _compilation.GetSpecialType(SpecialType.System_UInt16); break; 268case UnaryOperatorKind.Int: opType = _compilation.GetSpecialType(SpecialType.System_Int32); break; 269case UnaryOperatorKind.UInt: opType = _compilation.GetSpecialType(SpecialType.System_UInt32); break; 270case UnaryOperatorKind.Long: opType = _compilation.GetSpecialType(SpecialType.System_Int64); break; 271case UnaryOperatorKind.ULong: opType = _compilation.GetSpecialType(SpecialType.System_UInt64); break; 274case UnaryOperatorKind.Char: opType = _compilation.GetSpecialType(SpecialType.System_Char); break; 275case UnaryOperatorKind.Float: opType = _compilation.GetSpecialType(SpecialType.System_Single); break; 276case UnaryOperatorKind.Double: opType = _compilation.GetSpecialType(SpecialType.System_Double); break; 277case UnaryOperatorKind.Decimal: opType = _compilation.GetSpecialType(SpecialType.System_Decimal); break; 278case UnaryOperatorKind.Bool: opType = _compilation.GetSpecialType(SpecialType.System_Boolean); break; 693Debug.Assert(((NamedTypeSymbol)readonlySpanOfByte).TypeArgumentsWithAnnotationsNoUseSiteDiagnostics.Single().Type.SpecialType is SpecialType.System_Byte); 720TypeSymbol rightType = _compilation.GetSpecialType(SpecialType.System_Int32); 733return new BinaryOperatorSignature(kind, left, left, _compilation.GetSpecialType(SpecialType.System_Boolean)); 748case BinaryOperatorKind.Int: return _compilation.GetSpecialType(SpecialType.System_Int32); 749case BinaryOperatorKind.UInt: return _compilation.GetSpecialType(SpecialType.System_UInt32); 750case BinaryOperatorKind.Long: return _compilation.GetSpecialType(SpecialType.System_Int64); 751case BinaryOperatorKind.ULong: return _compilation.GetSpecialType(SpecialType.System_UInt64); 754case BinaryOperatorKind.Float: return _compilation.GetSpecialType(SpecialType.System_Single); 755case BinaryOperatorKind.Double: return _compilation.GetSpecialType(SpecialType.System_Double); 756case BinaryOperatorKind.Decimal: return _compilation.GetSpecialType(SpecialType.System_Decimal); 757case BinaryOperatorKind.Bool: return _compilation.GetSpecialType(SpecialType.System_Boolean); 760return _compilation.GetSpecialType(SpecialType.System_Object); 763return _compilation.GetSpecialType(SpecialType.System_String); 780case BinaryOperatorKind.Int: return _compilation.GetSpecialType(SpecialType.System_Int32); 781case BinaryOperatorKind.UInt: return _compilation.GetSpecialType(SpecialType.System_UInt32); 782case BinaryOperatorKind.Long: return _compilation.GetSpecialType(SpecialType.System_Int64); 783case BinaryOperatorKind.ULong: return _compilation.GetSpecialType(SpecialType.System_UInt64); 786case BinaryOperatorKind.Float: return _compilation.GetSpecialType(SpecialType.System_Single); 787case BinaryOperatorKind.Double: return _compilation.GetSpecialType(SpecialType.System_Double); 788case BinaryOperatorKind.Decimal: return _compilation.GetSpecialType(SpecialType.System_Decimal); 789case BinaryOperatorKind.Bool: return _compilation.GetSpecialType(SpecialType.System_Boolean); 792return _compilation.GetSpecialType(SpecialType.System_String); 795return _compilation.GetSpecialType(SpecialType.System_Object); 812case BinaryOperatorKind.Int: return _compilation.GetSpecialType(SpecialType.System_Int32); 813case BinaryOperatorKind.UInt: return _compilation.GetSpecialType(SpecialType.System_UInt32); 814case BinaryOperatorKind.Long: return _compilation.GetSpecialType(SpecialType.System_Int64); 815case BinaryOperatorKind.ULong: return _compilation.GetSpecialType(SpecialType.System_UInt64); 818case BinaryOperatorKind.Float: return _compilation.GetSpecialType(SpecialType.System_Single); 819case BinaryOperatorKind.Double: return _compilation.GetSpecialType(SpecialType.System_Double); 820case BinaryOperatorKind.Decimal: return _compilation.GetSpecialType(SpecialType.System_Decimal); 821case BinaryOperatorKind.Bool: return _compilation.GetSpecialType(SpecialType.System_Boolean); 822case BinaryOperatorKind.Object: return _compilation.GetSpecialType(SpecialType.System_Object); 826return _compilation.GetSpecialType(SpecialType.System_String); 839BinaryOperatorKind.Int => _compilation.GetSpecialType(SpecialType.System_Int32), 840BinaryOperatorKind.UInt => _compilation.GetSpecialType(SpecialType.System_UInt32), 841BinaryOperatorKind.Long => _compilation.GetSpecialType(SpecialType.System_Int64), 842BinaryOperatorKind.ULong => _compilation.GetSpecialType(SpecialType.System_UInt64), 845BinaryOperatorKind.Float => _compilation.GetSpecialType(SpecialType.System_Single), 846BinaryOperatorKind.Double => _compilation.GetSpecialType(SpecialType.System_Double), 847BinaryOperatorKind.Decimal => _compilation.GetSpecialType(SpecialType.System_Decimal), 848BinaryOperatorKind.Bool => _compilation.GetSpecialType(SpecialType.System_Boolean),
Compilation\CSharpCompilation.cs (47)
805return info.ConvertedType?.SpecialType != SpecialType.System_Void; 1663if ((int)specialType <= (int)SpecialType.None || (int)specialType >= (int)InternalSpecialType.NextAvailable) 1708constructedNullableInstance = this.GetSpecialType(SpecialType.System_Nullable_T).Construct(typeArgument); 1722case SpecialType.System_SByte: 1723case SpecialType.System_Byte: 1724case SpecialType.System_Int16: 1725case SpecialType.System_UInt16: 1726case SpecialType.System_Int32: 1727case SpecialType.System_UInt32: 1728case SpecialType.System_Int64: 1729case SpecialType.System_UInt64: 1730case SpecialType.System_Char: 1731case SpecialType.System_Single: 1732case SpecialType.System_Double: 1733case SpecialType.System_Decimal: 1734case SpecialType.System_Boolean: 1801SpecialType.None, 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); 4057private protected override INamedTypeSymbolInternal CommonGetSpecialType(SpecialType specialType) 4181return GetSpecialType(signed ? SpecialType.System_IntPtr : SpecialType.System_UIntPtr).AsNativeInteger(); 4313if (csharpReturnType.SpecialType != SpecialType.None && 4314csharpLeftType.SpecialType != SpecialType.None && 4315csharpRightType.SpecialType != SpecialType.None) 4336csharpReturnType.SpecialType is SpecialType.System_Boolean) 4339(SpecialType.System_Object, SpecialType.System_Object) or 4340(SpecialType.System_Delegate, SpecialType.System_Delegate)) 4353csharpReturnType.SpecialType == SpecialType.System_Boolean) 4381csharpReturnType.SpecialType is SpecialType.System_Boolean && 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; 4495=> IsReadOnlySpanType(type) && ((NamedTypeSymbol)type).TypeArgumentsWithAnnotationsNoUseSiteDiagnostics[0].SpecialType == SpecialType.System_Byte; 4538if (csharpReturnType.SpecialType != SpecialType.None && csharpOperandType.SpecialType != SpecialType.None) 4729internal bool CanEmitBoolean() => CanEmitSpecialType(SpecialType.System_Boolean); 4731internal bool CanEmitSpecialType(SpecialType type)
Compilation\CSharpSemanticModel.cs (2)
3873binaryOperator.Type.SpecialType == SpecialType.System_Boolean) 3876var objectType = binaryOperator.Type.ContainingAssembly.GetSpecialType(SpecialType.System_Object);
Compiler\AnonymousTypeMethodBodySynthesizer.cs (1)
38Debug.Assert(ContainingType.BaseTypeNoUseSiteDiagnostics.SpecialType == SpecialType.System_Object);
Compiler\ClsComplianceChecker.cs (7)
532System.Diagnostics.Debug.Assert((object)baseType != null || symbol.SpecialType == SpecialType.System_Object, "Only object has no base."); 1019case SpecialType.System_TypedReference: 1020case SpecialType.System_UIntPtr: 1024case SpecialType.System_SByte: // sic 1025case SpecialType.System_UInt16: 1026case SpecialType.System_UInt32: 1027case SpecialType.System_UInt64:
Compiler\MethodBodySynthesizer.cs (5)
37Debug.Assert((object)constructor.ContainingType.BaseTypeNoUseSiteDiagnostics == null || constructor.ContainingType.BaseTypeNoUseSiteDiagnostics.SpecialType == SpecialType.System_Object); 38var objectType = constructor.ContainingAssembly.GetSpecialType(SpecialType.System_Object); 94var intType = compilation.GetSpecialType(SpecialType.System_Int32); 95var objectType = compilation.GetSpecialType(SpecialType.System_Object); 352TypeSymbol boolType = compilation.GetSpecialType(SpecialType.System_Boolean);
Compiler\MethodBodySynthesizer.Lowered.cs (9)
55LocalSymbol i = F.SynthesizedLocal(F.SpecialType(SpecialType.System_Int32)); 56LocalSymbol hashCode = F.SynthesizedLocal(F.SpecialType(SpecialType.System_UInt32)); 85F.Binary(BinaryOperatorKind.ObjectNotEqual, F.SpecialType(SpecialType.System_Boolean), 112F.Binary(BinaryOperatorKind.LessThan, F.SpecialType(SpecialType.System_Boolean), 151.Construct(F.SpecialType(SpecialType.System_Char)); 153LocalSymbol i = F.SynthesizedLocal(F.SpecialType(SpecialType.System_Int32)); 154LocalSymbol hashCode = F.SynthesizedLocal(F.SpecialType(SpecialType.System_UInt32)); 201F.Binary(BinaryOperatorKind.LessThan, F.SpecialType(SpecialType.System_Boolean), 361Debug.Assert(system_Int32.SpecialType == SpecialType.System_Int32);
Emitter\EditAndContinue\CSharpSymbolMatcher.cs (2)
34_visitor = new Visitor(sourceAssembly, otherAssembly, synthesizedTypes, otherSynthesizedMembers, otherDeletedMembers, new DeepTranslator(otherAssembly.GetSpecialType(SpecialType.System_Object))); 280return _otherAssembly.GetSpecialType(SpecialType.System_Object);
Emitter\EditAndContinue\PEDeltaAssemblyBuilder.cs (3)
73_deepTranslator = new CSharpSymbolMatcher.DeepTranslator(sourceAssembly.GetSpecialType(SpecialType.System_Object)); 332var stringType = Compilation.GetSpecialType(SpecialType.System_String); 333var intType = Compilation.GetSpecialType(SpecialType.System_Int32);
Emitter\Model\NamedTypeSymbolAdapter.cs (3)
295baseType = AdaptedNamedTypeSymbol.ContainingAssembly.GetSpecialType(Microsoft.CodeAnalysis.SpecialType.System_Object); 359else if (method.MethodKind == MethodKind.Destructor && AdaptedNamedTypeSymbol.SpecialType != SpecialType.System_Object) 366TypeSymbol objectType = AdaptedNamedTypeSymbol.DeclaringCompilation.GetSpecialType(CodeAnalysis.SpecialType.System_Object);
Emitter\Model\ParameterSymbolAdapter.cs (3)
86if (constant.SpecialType != SpecialType.None) 244this.ExplicitDefaultConstantValue.SpecialType != SpecialType.System_Decimal && 245this.ExplicitDefaultConstantValue.SpecialType != SpecialType.System_DateTime;
Emitter\Model\PEAssemblyBuilder.cs (6)
512GetSpecialType(SpecialType.System_Byte, diagnostics)); 520GetSpecialType(SpecialType.System_Byte, diagnostics)); 528GetSpecialType(SpecialType.System_Boolean, diagnostics)); 536GetSpecialType(SpecialType.System_Boolean, diagnostics)); 551GetSpecialType(SpecialType.System_Int32, diagnostics)); 631private NamedTypeSymbol GetSpecialType(SpecialType type, BindingDiagnosticBag diagnostics)
Emitter\Model\PEModuleBuilder.cs (19)
814private NamedTypeSymbol GetUntranslatedSpecialType(SpecialType specialType, SyntaxNode syntaxNodeOpt, DiagnosticBag diagnostics) 818var typeSymbol = SourceModule.ContainingAssembly.GetSpecialType(specialType); 831internal sealed override Cci.INamedTypeReference GetSpecialType(SpecialType specialType, SyntaxNode syntaxNodeOpt, DiagnosticBag diagnostics) 854return namedType.SpecialType == (SpecialType)platformType; 1084if ((object)declaredBase != null && declaredBase.SpecialType == SpecialType.System_ValueType) 1442return GetSpecialType(SpecialType.System_Object, syntaxNodeOpt, diagnostics); 1487return new SynthesizedPrivateImplementationDetailsStaticConstructor(GetPrivateImplClass(syntaxOpt, diagnostics), GetUntranslatedSpecialType(SpecialType.System_Void, syntaxOpt, diagnostics)).GetCciAdapter(); 1578NamedTypeSymbol byteType = Compilation.GetSpecialType(SpecialType.System_Byte); 1599NamedTypeSymbol byteType = Compilation.GetSpecialType(SpecialType.System_Byte); 1622ImmutableArray.Create(new TypedConstant(Compilation.GetSpecialType(SpecialType.System_Byte), TypedConstantKind.Primitive, value))); 1662NamedTypeSymbol booleanType = Compilation.GetSpecialType(SpecialType.System_Boolean); 1825TypeSymbol returnType = factory.SpecialType(SpecialType.System_Void); 1826TypeSymbol unmatchedValueType = factory.SpecialType(SpecialType.System_Object); 1872TypeSymbol returnType = factory.SpecialType(SpecialType.System_Void); 1892TypeSymbol returnType = factory.SpecialType(SpecialType.System_Void); 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\Model\SynthesizedPrivateImplementationDetailsStaticConstructor.cs (1)
55factory.Array(payloadArrayType.ElementType, factory.Binary(BinaryOperatorKind.Addition, factory.SpecialType(SpecialType.System_Int32), factory.MaximumMethodDefIndex(), factory.Literal(1))));
Emitter\Model\TypeParameterSymbolAdapter.cs (4)
243SpecialType.System_ValueType, 261case SpecialType.System_Object: 264case SpecialType.System_ValueType: 281var typeRef = moduleBeingBuilt.GetSpecialType(SpecialType.System_ValueType,
Emitter\NoPia\EmbeddedTypesManager.cs (4)
58var typeSymbol = ModuleBeingBuilt.Compilation.GetSpecialType(SpecialType.System_String); 147ImmutableArray.Create(new TypedConstant(ctor.Parameters[0].Type, TypedConstantKind.Type, ctor.ContainingAssembly.GetSpecialType(SpecialType.System_Object))), 258if (namedType.SpecialType != SpecialType.None || namedType.IsErrorType() || !namedType.ContainingAssembly.IsLinked)
FlowAnalysis\AbstractFlowPass.cs (16)
643else if ((object)node.Type == null || node.Type.SpecialType != SpecialType.System_Boolean) 1459case SpecialType.System_Boolean: 1460case SpecialType.System_Char: 1461case SpecialType.System_SByte: 1462case SpecialType.System_Byte: 1463case SpecialType.System_Int16: 1464case SpecialType.System_UInt16: 1465case SpecialType.System_Int32: 1466case SpecialType.System_UInt32: 1467case SpecialType.System_Int64: 1468case SpecialType.System_UInt64: 1469case SpecialType.System_Decimal: 1470case SpecialType.System_Single: 1471case SpecialType.System_Double: 1472case SpecialType.System_DateTime: 1675&& node.Type.SpecialType == SpecialType.System_Boolean)
FlowAnalysis\DefiniteAssignment.cs (3)
906type.SpecialType != SpecialType.System_String && 907type is not ArrayTypeSymbol { IsSZArray: true, ElementType.SpecialType: SpecialType.System_Byte }) 1596(elementAccess.Argument.ConstantValueOpt is { SpecialType: SpecialType.System_Int32, Int32Value: 0 } ||
FlowAnalysis\NullableWalker.cs (17)
3053returnType.Type.SpecialType == SpecialType.System_Boolean) 3789&& (type.SpecialType == SpecialType.System_Boolean || type.IsDynamic() || type.IsErrorType()); 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) 7614if (method.ReturnType.SpecialType == SpecialType.System_Boolean 9004Debug.Assert(containingType.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T); 10039return compilation.GetSpecialType(SpecialType.System_Nullable_T).Construct(ImmutableArray.Create(underlying)); 11500if ((object)getMethod != null && getMethod.ContainingType.SpecialType == SpecialType.System_Nullable_T) 11610(conversion.Kind == ConversionKind.ExplicitReference && resultType.SpecialType == SpecialType.System_String)) 11618if (collectionExpression.Type!.SpecialType == SpecialType.System_Collections_IEnumerable) 11674else if (resultType.SpecialType == SpecialType.System_String) 12318Debug.Assert(node.Type.SpecialType == SpecialType.System_Boolean); 12321if (typeExpr.Type?.SpecialType == SpecialType.System_Object) 12370Debug.Assert(node.Type.SpecialType == SpecialType.System_RuntimeArgumentHandle);
Lowering\AsyncRewriter\AsyncExceptionHandlerRewriter.cs (6)
186var exceptionType = _F.SpecialType(SpecialType.System_Object); 189var pendingBranchVar = new SynthesizedLocal(_F.CurrentFunction, TypeWithAnnotations.Create(_F.SpecialType(SpecialType.System_Int32)), SynthesizedLocalKind.TryAwaitPendingBranch, tryStatementSyntax); 407LocalSymbol obj = _F.SynthesizedLocal(_F.SpecialType(SpecialType.System_Object)); 554var catchType = node.ExceptionTypeOpt ?? _F.SpecialType(SpecialType.System_Object); 1044this.pendingCaughtException = new SynthesizedLocal(F.CurrentFunction, TypeWithAnnotations.Create(F.SpecialType(SpecialType.System_Object)), SynthesizedLocalKind.TryAwaitPendingCaughtException, tryStatementSyntax); 1045this.pendingCatch = new SynthesizedLocal(F.CurrentFunction, TypeWithAnnotations.Create(F.SpecialType(SpecialType.System_Int32)), SynthesizedLocalKind.TryAwaitPendingCatch, tryStatementSyntax);
Lowering\AsyncRewriter\AsyncMethodBuilderMemberCollection.cs (4)
136resultType: F.SpecialType(SpecialType.System_Void), 169resultType: F.SpecialType(SpecialType.System_Void), 241resultType: F.SpecialType(SpecialType.System_Void), 259resultType = F.SpecialType(SpecialType.System_Object);
Lowering\AsyncRewriter\AsyncMethodToStateMachineRewriter.cs (2)
460resultType: F.SpecialType(SpecialType.System_Boolean)).ToExpression(); 472? F.SpecialType(SpecialType.System_Object)
Lowering\AsyncRewriter\AsyncRewriter.AsyncIteratorRewriter.cs (5)
126NamedTypeSymbol boolType = F.SpecialType(SpecialType.System_Boolean); 337var versionSymbol = F.SynthesizedLocal(F.SpecialType(SpecialType.System_Int16)); 498.Construct(F.SpecialType(SpecialType.System_Boolean)); 523.Construct(F.SpecialType(SpecialType.System_Boolean)); 549.Construct(F.SpecialType(SpecialType.System_Boolean));
Lowering\AsyncRewriter\AsyncRewriter.cs (2)
141stateField = F.StateMachineField(F.SpecialType(SpecialType.System_Int32), GeneratedNames.MakeStateMachineStateFieldName(), isPublic: true); 147instanceIdField = F.StateMachineField(F.SpecialType(SpecialType.System_UInt64), GeneratedNames.MakeStateMachineStateIdFieldName(), isPublic: true);
Lowering\AsyncRewriter\AsyncStateMachine.cs (1)
49interfaces.Add(compilation.GetWellKnownType(WellKnownType.System_Threading_Tasks_Sources_IValueTaskSource_T).Construct(compilation.GetSpecialType(SpecialType.System_Boolean)));
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (7)
103_int32Type = _bound.SpecialType(SpecialType.System_Int32); 104_objectType = _bound.SpecialType(SpecialType.System_Object); 105_nullableType = _bound.SpecialType(SpecialType.System_Nullable_T); 106_IEnumerableType = _bound.SpecialType(SpecialType.System_Collections_Generic_IEnumerable_T); 369var operand = _bound.Null(_bound.SpecialType(SpecialType.System_Object)); 581if (underlying.SpecialType == SpecialType.System_Boolean) 586var possiblePromote = Binder.GetEnumPromotedType(underlying.SpecialType);
Lowering\DiagnosticsPass_Warnings.cs (4)
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)) 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\CodeCoverageInstrumenter.cs (3)
116TypeSymbol payloadElementType = methodBodyFactory.SpecialType(SpecialType.System_Boolean); 219methodBodyFactory.SpecialType(SpecialType.System_Int32), fileIndices.ToImmutable()); 292_methodBodyFactory.SpecialType(SpecialType.System_Boolean),
Lowering\Instrumentation\LocalStateTracingInstrumenter.cs (17)
215SpecialType.System_Boolean 217SpecialType.System_SByte or SpecialType.System_Byte 219SpecialType.System_Int16 or SpecialType.System_UInt16 or SpecialType.System_Char 221SpecialType.System_Int32 or SpecialType.System_UInt32 223SpecialType.System_Int64 or SpecialType.System_UInt64 225SpecialType.System_Single 227SpecialType.System_Double 229SpecialType.System_Decimal 231SpecialType.System_String 462if (parameter.Type.SpecialType == SpecialType.System_String && targetType.SpecialType != SpecialType.System_String) 565if (invocation.Type.SpecialType != SpecialType.System_Void)
Lowering\IteratorRewriter\IteratorConstructor.cs (1)
26var intType = container.DeclaringCompilation.GetSpecialType(SpecialType.System_Int32);
Lowering\IteratorRewriter\IteratorFinallyMethodSymbol.cs (1)
147get { return TypeWithAnnotations.Create(ContainingAssembly.GetSpecialType(SpecialType.System_Void)); }
Lowering\IteratorRewriter\IteratorRewriter.cs (15)
70case SpecialType.System_Collections_IEnumerable: 71case SpecialType.System_Collections_Generic_IEnumerable_T: 75case SpecialType.System_Collections_IEnumerator: 76case SpecialType.System_Collections_Generic_IEnumerator_T: 102EnsureSpecialType(SpecialType.System_Int32, bag); 103EnsureSpecialType(SpecialType.System_IDisposable, bag); 107EnsureSpecialType(SpecialType.System_Collections_IEnumerator, bag); 113EnsureSpecialType(SpecialType.System_Collections_Generic_IEnumerator_T, bag); 119EnsureSpecialType(SpecialType.System_Collections_IEnumerable, bag); 121EnsureSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T, bag); 146private void EnsureSpecialType(SpecialType type, BindingDiagnosticBag bag) 177stateField = F.StateMachineField(F.SpecialType(SpecialType.System_Int32), GeneratedNames.MakeStateMachineStateFieldName()); 182instanceIdField = F.StateMachineField(F.SpecialType(SpecialType.System_UInt64), GeneratedNames.MakeStateMachineStateIdFieldName()); 218var IEnumeratorOfElementType = F.SpecialType(SpecialType.System_Collections_Generic_IEnumerator_T).Construct(ImmutableArray.Create(_elementType)); 258var IEnumerableOfElementType = F.SpecialType(SpecialType.System_Collections_Generic_IEnumerable_T).Construct(_elementType.Type);
Lowering\IteratorRewriter\IteratorStateMachine.cs (6)
34interfaces.Add(ContainingAssembly.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T).Construct(ElementType.Type)); 35interfaces.Add(ContainingAssembly.GetSpecialType(SpecialType.System_Collections_IEnumerable)); 38interfaces.Add(ContainingAssembly.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerator_T).Construct(ElementType.Type)); 39interfaces.Add(ContainingAssembly.GetSpecialType(SpecialType.System_IDisposable)); 40interfaces.Add(ContainingAssembly.GetSpecialType(SpecialType.System_Collections_IEnumerator)); 61internal override NamedTypeSymbol BaseTypeNoUseSiteDiagnostics => ContainingAssembly.GetSpecialType(SpecialType.System_Object);
Lowering\LocalRewriter\LocalRewriter.DecisionDagRewriter.cs (15)
538if (t1.Input.Type.SpecialType is SpecialType.System_Double or SpecialType.System_Single) 752bool isStringInput = input.Type.SpecialType == SpecialType.System_String; 790case SpecialType.System_IntPtr: 792input = _factory.Convert(_factory.SpecialType(SpecialType.System_Int64), input); 796case SpecialType.System_UIntPtr: 798input = _factory.Convert(_factory.SpecialType(SpecialType.System_UInt64), input); 815SpecialType.System_Single => BinaryOperatorKind.FloatLessThanOrEqual, 816SpecialType.System_Double => BinaryOperatorKind.DoubleLessThanOrEqual, 817SpecialType.System_Decimal => BinaryOperatorKind.DecimalLessThanOrEqual, 948TypeSymbol returnType = _factory.SpecialType(SpecialType.System_UInt32); 951StringPatternInput.String => _factory.SpecialType(SpecialType.System_String), 953.Construct(_factory.SpecialType(SpecialType.System_Char)), 955.Construct(_factory.SpecialType(SpecialType.System_Char)), 1066_whenNodeIdentifierLocal ??= _factory.SynthesizedLocal(_factory.SpecialType(SpecialType.System_Int32));
Lowering\LocalRewriter\LocalRewriter.PatternLocalRewriter.cs (15)
207inputType = _factory.SpecialType(SpecialType.System_Object); 247Debug.Assert(e.Property.GetMethod.Parameters[0].Type.SpecialType == SpecialType.System_Int32); 377TypeSymbol objectType = _factory.SpecialType(SpecialType.System_Object); 378var operandType = new PointerTypeSymbol(TypeWithAnnotations.Create(_factory.SpecialType(SpecialType.System_Void))); 384_factory.SpecialType(SpecialType.System_Boolean), 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) 421SpecialType.System_Byte => true, 422SpecialType.System_SByte => true, 423SpecialType.System_Int16 => true, 424SpecialType.System_UInt16 => true, 427comparisonType = _factory.SpecialType(SpecialType.System_Int32); 432return this._localRewriter.MakeBinaryOperator(_factory.Syntax, operatorKind, input, literal, _factory.SpecialType(SpecialType.System_Boolean), method: null, constrainedToTypeOpt: null); 443.Construct(_factory.SpecialType(SpecialType.System_Char));
Lowering\LocalRewriter\LocalRewriter_BinaryOperator.cs (44)
118Debug.Assert(node.Type.SpecialType == SpecialType.System_String, "Non-string binary addition should have been handled by VisitConversion or VisitArguments"); 599return arrLength.Update(arrLength.Expression, _factory.SpecialType(SpecialType.System_UIntPtr)); 653var boolean = _compilation.GetSpecialType(SpecialType.System_Boolean); 830TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 926return MakeLiteral(syntax, ConstantValue.Create(value), _compilation.GetSpecialType(SpecialType.System_Boolean)); 1015TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 1242TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 1475TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 1660TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 1852TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 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 }); 2101TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 2115TypeSymbol objectType = _compilation.GetSpecialType(SpecialType.System_Object); 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; 2347SpecialType destinationType = numericSpecialType; 2350case SpecialType.System_Int32: 2361destinationType = SpecialType.System_IntPtr; 2365case SpecialType.System_UInt32: 2372destinationType = SpecialType.System_UIntPtr; 2376case SpecialType.System_Int64: 2377destinationType = SpecialType.System_IntPtr; 2379case SpecialType.System_UInt64: 2380destinationType = SpecialType.System_UIntPtr; 2397case SpecialType.System_Int32: 2399TypeSymbol nativeIntType = _factory.SpecialType(SpecialType.System_IntPtr); 2411case SpecialType.System_UInt32: 2413TypeSymbol longType = _factory.SpecialType(SpecialType.System_Int64); 2414TypeSymbol nativeIntType = _factory.SpecialType(SpecialType.System_IntPtr); 2424case SpecialType.System_Int64: 2426TypeSymbol longType = _factory.SpecialType(SpecialType.System_Int64); 2427TypeSymbol nativeIntType = _factory.SpecialType(SpecialType.System_IntPtr); 2436case SpecialType.System_UInt64: 2438TypeSymbol ulongType = _factory.SpecialType(SpecialType.System_UInt64); 2439TypeSymbol nativeUIntType = _factory.SpecialType(SpecialType.System_UIntPtr); 2472Debug.Assert(returnType.SpecialType == SpecialType.System_Int64); 2484_factory.SpecialType(SpecialType.System_IntPtr),
Lowering\LocalRewriter\LocalRewriter_Call.cs (1)
1443_compilation.GetSpecialType(SpecialType.System_Int32))),
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (9)
192Debug.Assert(targetEnumerableType.OriginalDefinition == (object)_compilation.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T)); 202var iCollectionOfTType = _compilation.GetSpecialType(SpecialType.System_Collections_Generic_ICollection_T); 409SpecialType.System_Collections_Generic_IEnumerable_T or 410SpecialType.System_Collections_Generic_IReadOnlyCollection_T or 411SpecialType.System_Collections_Generic_IReadOnlyList_T) 573var intType = _factory.SpecialType(SpecialType.System_Int32); 751_compilation.GetSpecialType(SpecialType.System_Int32))), 789Debug.Assert(indexTemp.Type is { SpecialType: SpecialType.System_Int32 }); 1125Debug.Assert(indexTemp.Type is { SpecialType: SpecialType.System_Int32 });
Lowering\LocalRewriter\LocalRewriter_CompoundAssignmentOperator.cs (1)
207Debug.Assert(node.Operator.ReturnType is { SpecialType: SpecialType.System_String });
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (116)
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) 601createSpan = _factory.ModuleBuilderOpt.EnsureInlineArrayAsReadOnlySpanExists(syntax, spanType.OriginalDefinition, _factory.SpecialType(SpecialType.System_Int32), _diagnostics.DiagnosticBag); 606createSpan = _factory.ModuleBuilderOpt.EnsureInlineArrayAsSpanExists(syntax, spanType.OriginalDefinition, _factory.SpecialType(SpecialType.System_Int32), _diagnostics.DiagnosticBag); 760SpecialType GetUnderlyingSpecialType(TypeSymbol type) => 763bool IsInRange(SpecialType type, SpecialType low, SpecialType high) => 766SpecialType sourceST = GetUnderlyingSpecialType(source); 767SpecialType targetST = GetUnderlyingSpecialType(target); 772IsInRange(sourceST, SpecialType.System_Char, SpecialType.System_Double) && 773IsInRange(targetST, SpecialType.System_Char, SpecialType.System_UInt64); 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; 1548if (t0Type == SpecialType.System_IntPtr) 1557case SpecialType.System_Byte: 1558case SpecialType.System_SByte: 1559case SpecialType.System_Int16: 1560case SpecialType.System_UInt16: 1561case SpecialType.System_Char: 1562case SpecialType.System_Int32: 1564case SpecialType.System_UInt32: 1565case SpecialType.System_UInt64: 1566case SpecialType.System_Int64: 1567case SpecialType.System_Single: 1568case SpecialType.System_Double: 1569case SpecialType.System_Decimal: 1573else if (t0Type == SpecialType.System_UIntPtr) 1582case SpecialType.System_Byte: 1583case SpecialType.System_UInt16: 1584case SpecialType.System_Char: 1585case SpecialType.System_UInt32: 1587case SpecialType.System_SByte: 1588case SpecialType.System_Int16: 1589case SpecialType.System_Int32: 1590case SpecialType.System_UInt64: 1591case SpecialType.System_Int64: 1592case SpecialType.System_Single: 1593case SpecialType.System_Double: 1594case SpecialType.System_Decimal: 1598else if (s0Type == SpecialType.System_IntPtr) 1607case SpecialType.System_Byte: 1608case SpecialType.System_SByte: 1609case SpecialType.System_Int16: 1610case SpecialType.System_UInt16: 1611case SpecialType.System_Char: 1612case SpecialType.System_UInt32: 1613case SpecialType.System_Int32: 1615case SpecialType.System_UInt64: 1616case SpecialType.System_Int64: 1617case SpecialType.System_Single: 1618case SpecialType.System_Double: 1619case SpecialType.System_Decimal: 1623else if (s0Type == SpecialType.System_UIntPtr) 1632case SpecialType.System_SByte: 1633case SpecialType.System_Int16: 1634case SpecialType.System_Int32: 1635case SpecialType.System_Byte: 1636case SpecialType.System_UInt16: 1637case SpecialType.System_Char: 1638case SpecialType.System_UInt32: 1640case SpecialType.System_UInt64: 1641case SpecialType.System_Int64: 1642case SpecialType.System_Single: 1643case SpecialType.System_Double: 1644case SpecialType.System_Decimal: 1655if (typeFrom.SpecialType == SpecialType.System_Decimal) 1660case SpecialType.System_Char: return SpecialMember.System_Decimal__op_Explicit_ToChar; 1661case SpecialType.System_SByte: return SpecialMember.System_Decimal__op_Explicit_ToSByte; 1662case SpecialType.System_Byte: return SpecialMember.System_Decimal__op_Explicit_ToByte; 1663case SpecialType.System_Int16: return SpecialMember.System_Decimal__op_Explicit_ToInt16; 1664case SpecialType.System_UInt16: return SpecialMember.System_Decimal__op_Explicit_ToUInt16; 1665case SpecialType.System_Int32: return SpecialMember.System_Decimal__op_Explicit_ToInt32; 1666case SpecialType.System_UInt32: return SpecialMember.System_Decimal__op_Explicit_ToUInt32; 1667case SpecialType.System_Int64: return SpecialMember.System_Decimal__op_Explicit_ToInt64; 1668case SpecialType.System_UInt64: return SpecialMember.System_Decimal__op_Explicit_ToUInt64; 1669case SpecialType.System_Single: return SpecialMember.System_Decimal__op_Explicit_ToSingle; 1670case SpecialType.System_Double: return SpecialMember.System_Decimal__op_Explicit_ToDouble; 1680case SpecialType.System_Char: return SpecialMember.System_Decimal__op_Implicit_FromChar; 1681case SpecialType.System_SByte: return SpecialMember.System_Decimal__op_Implicit_FromSByte; 1682case SpecialType.System_Byte: return SpecialMember.System_Decimal__op_Implicit_FromByte; 1683case SpecialType.System_Int16: return SpecialMember.System_Decimal__op_Implicit_FromInt16; 1684case SpecialType.System_UInt16: return SpecialMember.System_Decimal__op_Implicit_FromUInt16; 1685case SpecialType.System_Int32: return SpecialMember.System_Decimal__op_Implicit_FromInt32; 1686case SpecialType.System_UInt32: return SpecialMember.System_Decimal__op_Implicit_FromUInt32; 1687case SpecialType.System_Int64: return SpecialMember.System_Decimal__op_Implicit_FromInt64; 1688case SpecialType.System_UInt64: return SpecialMember.System_Decimal__op_Implicit_FromUInt64; 1689case SpecialType.System_Single: return SpecialMember.System_Decimal__op_Explicit_FromSingle; 1690case SpecialType.System_Double: return SpecialMember.System_Decimal__op_Explicit_FromDouble; 1699Debug.Assert(fromType.SpecialType == SpecialType.System_Decimal || toType.SpecialType == SpecialType.System_Decimal); 1701if (fromType.SpecialType == SpecialType.System_Decimal) 1705case SpecialType.System_IntPtr: 1706case SpecialType.System_UIntPtr: 1707operand = RewriteDecimalConversionCore(syntax, operand, fromType, get64BitType(_compilation, signed: toType.SpecialType == SpecialType.System_IntPtr), isImplicit, constantValueOpt); 1715case SpecialType.System_IntPtr: 1716case SpecialType.System_UIntPtr: 1717operand = MakeConversionNode(operand, get64BitType(_compilation, signed: fromType.SpecialType == SpecialType.System_IntPtr), @checked); 1725static TypeSymbol get64BitType(CSharpCompilation compilation, bool signed) => compilation.GetSpecialType(signed ? SpecialType.System_Int64 : SpecialType.System_UInt64); 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 (3)
209else if (fixedCollectionInitializer.Expression.Type is { SpecialType: SpecialType.System_String }) 552BoundExpression lengthCheck = factory.Binary(BinaryOperatorKind.IntNotEqual, factory.SpecialType(SpecialType.System_Boolean), lengthCall, factory.Literal(0)); 555BoundExpression condition = factory.Binary(BinaryOperatorKind.LogicalBoolAnd, factory.SpecialType(SpecialType.System_Boolean), notNullCheck, lengthCheck);
Lowering\LocalRewriter\LocalRewriter_ForEachStatement.cs (13)
76if (origDefinition.SpecialType == SpecialType.System_String) 393Debug.Assert(enumeratorType.OriginalDefinition.SpecialType != SpecialType.System_Nullable_T); 402var objectType = _factory.SpecialType(SpecialType.System_Object); 459type: _compilation.GetSpecialType(SpecialType.System_Boolean)), 599TypeSymbol intType = _compilation.GetSpecialType(SpecialType.System_Int32); 600TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 633MakeLiteral(forEachSyntax, ConstantValue.Default(SpecialType.System_Int32), intType)); 760NamedTypeSymbol intType = rewriter._factory.SpecialType(SpecialType.System_Int32); 900TypeSymbol intType = _compilation.GetSpecialType(SpecialType.System_Int32); 901TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 922MakeLiteral(forEachSyntax, ConstantValue.Default(SpecialType.System_Int32), intType)); 1050TypeSymbol intType = _compilation.GetSpecialType(SpecialType.System_Int32); 1051TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean);
Lowering\LocalRewriter\LocalRewriter_Index.cs (1)
17NamedTypeSymbol booleanType = _compilation.GetSpecialType(SpecialType.System_Boolean);
Lowering\LocalRewriter\LocalRewriter_IndexerAccess.cs (12)
221if (node.Argument.Type.SpecialType == SpecialType.System_Int32) 278if (startExpr.ConstantValueOpt is { SpecialType: SpecialType.System_Int32, Int32Value: 0 } && 279rangeSizeExpr.ConstantValueOpt is { SpecialType: SpecialType.System_Int32, Int32Value: >= 0 and int rangeSizeConst } && 341Debug.Assert(index.Type?.SpecialType == SpecialType.System_Int32); 345if (index.ConstantValueOpt is { SpecialType: SpecialType.System_Int32, Int32Value: int constIndex }) 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 (15)
30Debug.Assert(type is { SpecialType: SpecialType.System_Decimal }); 38Debug.Assert(type is { SpecialType: SpecialType.System_DateTime }); 73curMethod.ContainingType.SpecialType != SpecialType.System_Decimal) && 100arguments.Add(new BoundLiteral(syntax, ConstantValue.Create((int)value), _compilation.GetSpecialType(SpecialType.System_Int32))); 106arguments.Add(new BoundLiteral(syntax, ConstantValue.Create((uint)value), _compilation.GetSpecialType(SpecialType.System_UInt32))); 112arguments.Add(new BoundLiteral(syntax, ConstantValue.Create((long)value), _compilation.GetSpecialType(SpecialType.System_Int64))); 118arguments.Add(new BoundLiteral(syntax, ConstantValue.Create((ulong)value), _compilation.GetSpecialType(SpecialType.System_UInt64))); 124arguments.Add(new BoundLiteral(syntax, ConstantValue.Create(low), _compilation.GetSpecialType(SpecialType.System_Int32))); 125arguments.Add(new BoundLiteral(syntax, ConstantValue.Create(mid), _compilation.GetSpecialType(SpecialType.System_Int32))); 126arguments.Add(new BoundLiteral(syntax, ConstantValue.Create(high), _compilation.GetSpecialType(SpecialType.System_Int32))); 127arguments.Add(new BoundLiteral(syntax, ConstantValue.Create(isNegative), _compilation.GetSpecialType(SpecialType.System_Boolean))); 128arguments.Add(new BoundLiteral(syntax, ConstantValue.Create(scale), _compilation.GetSpecialType(SpecialType.System_Byte))); 133Debug.Assert(ctor.ContainingType.SpecialType == SpecialType.System_Decimal); 148arguments.Add(new BoundLiteral(syntax, ConstantValue.Create(constantValue.DateTimeValue.Ticks), _compilation.GetSpecialType(SpecialType.System_Int64))); 152Debug.Assert(ctor.ContainingType.SpecialType == SpecialType.System_DateTime);
Lowering\LocalRewriter\LocalRewriter_LockStatement.cs (3)
36argumentType = _compilation.GetSpecialType(SpecialType.System_Object); 88argumentType = _compilation.GetSpecialType(SpecialType.System_Object); 141TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean);
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 (4)
50case SpecialType.System_Int32: 53case SpecialType.System_UInt32: 56case SpecialType.System_Int64: 59case SpecialType.System_UInt64:
Lowering\LocalRewriter\LocalRewriter_Range.cs (1)
143TypeSymbol boolType = _compilation.GetSpecialType(SpecialType.System_Boolean);
Lowering\LocalRewriter\LocalRewriter_StackAlloc.cs (2)
109TypeSymbol uintType = _factory.SpecialType(SpecialType.System_UInt32); 110TypeSymbol uintPtrType = _factory.SpecialType(SpecialType.System_UIntPtr);
Lowering\LocalRewriter\LocalRewriter_StringConcat.cs (18)
75Debug.Assert(visitedArguments.All(arg => arg.Type!.SpecialType is SpecialType.System_String or SpecialType.System_Char or SpecialType.System_Object)); 112case SpecialType.System_String: 115case SpecialType.System_Char: 153bool needsImplicitConversionFromStringToSpan = visitedArguments.Any(arg => arg.Type is { SpecialType: SpecialType.System_String }); 154var charType = _compilation.GetSpecialType(SpecialType.System_Char); 190var array = _factory.ArrayOrEmpty(_factory.SpecialType(SpecialType.System_String), finalArguments); 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); 594if (cv.SpecialType == SpecialType.System_Char) 707type: _compilation.GetSpecialType(SpecialType.System_String));
Lowering\LocalRewriter\LocalRewriter_StringInterpolation.cs (5)
58Debug.Assert(localType.SpecialType == SpecialType.System_Boolean); 75Debug.Assert(call.Type.SpecialType == SpecialType.System_Boolean == usesBoolReturns); 102var boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 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_SwitchExpression.cs (1)
126var objectType = _factory.SpecialType(SpecialType.System_Object);
Lowering\LocalRewriter\LocalRewriter_TupleBinaryOperator.cs (1)
583Debug.Assert(boolOperator.ReturnType.SpecialType == SpecialType.System_Boolean);
Lowering\LocalRewriter\LocalRewriter_UnaryOperator.cs (34)
85Debug.Assert((kind == UnaryOperatorKind.DynamicTrue || kind == UnaryOperatorKind.DynamicFalse) && type.SpecialType == SpecialType.System_Boolean 135var upconvertSpecialType = Binder.GetEnumPromotedType(underlyingType.SpecialType); 790type = _compilation.GetSpecialType(SpecialType.System_Nullable_T).Construct(type); 889Debug.Assert(constantOne.SpecialType != SpecialType.None); 890Debug.Assert(binaryOperandType.SpecialType != SpecialType.None); 920Debug.Assert(boundOne.Type is { SpecialType: SpecialType.System_Int32 }); 934if (unaryOperandType.SpecialType == SpecialType.System_Decimal) 938else if (unaryOperandType.IsNullableType() && unaryOperandType.GetNullableUnderlyingType().SpecialType == SpecialType.System_Decimal) 973Debug.Assert(operand.Type is { SpecialType: SpecialType.System_Decimal }); 980Debug.Assert(operand.Type is { } && operand.Type.IsNullableType() && operand.Type.GetNullableUnderlyingType().SpecialType == SpecialType.System_Decimal); 1056SpecialType specialType; 1061specialType = SpecialType.System_Int32; 1064specialType = SpecialType.System_SByte; 1067specialType = SpecialType.System_Int16; 1070specialType = SpecialType.System_Byte; 1073specialType = SpecialType.System_UInt16; 1076specialType = SpecialType.System_Char; 1079specialType = SpecialType.System_UInt32; 1082specialType = SpecialType.System_Int64; 1085specialType = SpecialType.System_UInt64; 1088specialType = SpecialType.System_IntPtr; 1091specialType = SpecialType.System_UIntPtr; 1094specialType = SpecialType.System_Single; 1097specialType = SpecialType.System_Double; 1100specialType = SpecialType.System_Decimal; 1113type = _compilation.GetSpecialType(SpecialType.System_Nullable_T).Construct(type); 1180case SpecialType.System_SByte: 1181case SpecialType.System_Int16: 1182case SpecialType.System_Int32: 1185case SpecialType.System_Byte: 1186case SpecialType.System_UInt16: 1187case SpecialType.System_UInt32: 1190case SpecialType.System_Int64: 1193case SpecialType.System_UInt64:
Lowering\LocalRewriter\LocalRewriter_UsingStatement.cs (2)
163_compilation.GetSpecialType(SpecialType.System_IDisposable) : 239_compilation.GetSpecialType(SpecialType.System_IDisposable) :
Lowering\LocalRewriter\LoweredDynamicOperationFactory.cs (4)
217resultType = _factory.SpecialType(SpecialType.System_Void); 310resultType = _factory.SpecialType(SpecialType.System_Void); 504var resultType = _factory.SpecialType(SpecialType.System_Boolean); 899var systemObjectType = _factory.SpecialType(SpecialType.System_Object);
Lowering\SpillSequenceSpiller.cs (1)
1147Debug.Assert(condition.Type.SpecialType == SpecialType.System_Boolean);
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (1)
127this.cachedState = F.SynthesizedLocal(F.SpecialType(SpecialType.System_Int32), syntax: F.Syntax, kind: SynthesizedLocalKind.StateMachineCachedState);
Lowering\StateMachineRewriter\ResumableStateMachineStateAllocator.cs (1)
92f.SpecialType(SpecialType.System_Boolean),
Lowering\StateMachineRewriter\StateMachineRewriter.cs (1)
108initialThreadIdField = F.StateMachineField(F.SpecialType(SpecialType.System_Int32), GeneratedNames.MakeIteratorCurrentThreadIdFieldName());
Lowering\SyntheticBoundNodeFactory.cs (40)
296public NamedTypeSymbol SpecialType(SpecialType st) 658return new BoundIsOperator(this.Syntax, operand, Type(type), c.Kind, SpecialType(Microsoft.CodeAnalysis.SpecialType.System_Boolean)) { WasCompilerGenerated = true }; 663Debug.Assert(left.Type?.SpecialType == CodeAnalysis.SpecialType.System_Boolean); 664Debug.Assert(right.Type?.SpecialType == CodeAnalysis.SpecialType.System_Boolean); 665return Binary(BinaryOperatorKind.LogicalBoolAnd, SpecialType(Microsoft.CodeAnalysis.SpecialType.System_Boolean), left, right); 670Debug.Assert(left.Type?.SpecialType == CodeAnalysis.SpecialType.System_Boolean); 671Debug.Assert(right.Type?.SpecialType == CodeAnalysis.SpecialType.System_Boolean); 672return Binary(BinaryOperatorKind.LogicalBoolOr, SpecialType(Microsoft.CodeAnalysis.SpecialType.System_Boolean), left, right); 677return Binary(BinaryOperatorKind.IntEqual, SpecialType(Microsoft.CodeAnalysis.SpecialType.System_Boolean), left, right); 682return Binary(BinaryOperatorKind.ObjectEqual, SpecialType(Microsoft.CodeAnalysis.SpecialType.System_Boolean), left, right); 687var objectType = SpecialType(Microsoft.CodeAnalysis.SpecialType.System_Object); 693return Binary(BinaryOperatorKind.ObjectNotEqual, SpecialType(Microsoft.CodeAnalysis.SpecialType.System_Boolean), left, right); 698return Binary(BinaryOperatorKind.IntNotEqual, SpecialType(Microsoft.CodeAnalysis.SpecialType.System_Boolean), left, right); 703return Binary(BinaryOperatorKind.IntLessThan, SpecialType(Microsoft.CodeAnalysis.SpecialType.System_Boolean), left, right); 708return Binary(BinaryOperatorKind.IntGreaterThanOrEqual, SpecialType(CodeAnalysis.SpecialType.System_Boolean), left, right); 713return Binary(BinaryOperatorKind.IntSubtraction, SpecialType(CodeAnalysis.SpecialType.System_Int32), left, right); 718return Binary(BinaryOperatorKind.IntMultiplication, SpecialType(CodeAnalysis.SpecialType.System_Int32), left, right); 723return new BoundLiteral(Syntax, ConstantValue.Create(value), SpecialType(Microsoft.CodeAnalysis.SpecialType.System_Byte)) { WasCompilerGenerated = true }; 728return new BoundLiteral(Syntax, ConstantValue.Create(value), SpecialType(Microsoft.CodeAnalysis.SpecialType.System_Int32)) { WasCompilerGenerated = true }; 736return new BoundLiteral(Syntax, ConstantValue.Create(value), SpecialType(Microsoft.CodeAnalysis.SpecialType.System_UInt32)) { WasCompilerGenerated = true }; 787case { SpecialType: CodeAnalysis.SpecialType.System_Double }: 790case { SpecialType: CodeAnalysis.SpecialType.System_Single }: 1083Debug.Assert(ex.Type is { SpecialType: CodeAnalysis.SpecialType.System_Int32 }); 1145return new BoundLiteral(Syntax, ConstantValue.Create(value), SpecialType(Microsoft.CodeAnalysis.SpecialType.System_Boolean)) { WasCompilerGenerated = true }; 1157return new BoundLiteral(Syntax, stringConst, SpecialType(Microsoft.CodeAnalysis.SpecialType.System_String)) { WasCompilerGenerated = true }; 1168return new BoundLiteral(Syntax, charConst, SpecialType(Microsoft.CodeAnalysis.SpecialType.System_Char)) { WasCompilerGenerated = true }; 1179return new BoundArrayLength(Syntax, array, SpecialType(Microsoft.CodeAnalysis.SpecialType.System_Int32)); 1310return new BoundSizeOfOperator(Syntax, Type(type), Binder.GetConstantSizeOf(type), SpecialType(Microsoft.CodeAnalysis.SpecialType.System_Int32)) { WasCompilerGenerated = true }; 1336SpecialType(Microsoft.CodeAnalysis.SpecialType.System_Int32)) 1346SpecialType(Microsoft.CodeAnalysis.SpecialType.System_Int32)) 1356SpecialType(Microsoft.CodeAnalysis.SpecialType.System_Int32)) 1364SpecialType(Microsoft.CodeAnalysis.SpecialType.System_UInt64)) 1379return new BoundModuleVersionIdString(Syntax, SpecialType(Microsoft.CodeAnalysis.SpecialType.System_String)) { WasCompilerGenerated = true }; 1388=> new BoundThrowIfModuleCancellationRequested(Syntax, SpecialType(CodeAnalysis.SpecialType.System_Void)) { WasCompilerGenerated = true }; 1397SpecialType(Microsoft.CodeAnalysis.SpecialType.System_Int32)) 1409SpecialType(Microsoft.CodeAnalysis.SpecialType.System_Int32)) 1640Debug.Assert(expression is { Type: { SpecialType: CodeAnalysis.SpecialType.System_Boolean } }); 1773TypeSymbol boolType = Compilation.GetSpecialType(CodeAnalysis.SpecialType.System_Boolean); 1787TypeSymbol objectType = SpecialType(CodeAnalysis.SpecialType.System_Object); 1840Debug.Assert(returnType.SpecialType == CodeAnalysis.SpecialType.System_Boolean);
Operations\CSharpOperationFactory.cs (2)
1899: compilation.GetSpecialType(SpecialType.System_IDisposable); 2078TypeWithAnnotations.Create(((CSharpCompilation)_semanticModel.Compilation).GetSpecialType(SpecialType.System_Boolean)),
Parser\Lexer.cs (29)
102internal SpecialType ValueKind; 364case SpecialType.System_Int32: 367case SpecialType.System_UInt32: 370case SpecialType.System_Int64: 373case SpecialType.System_UInt64: 376case SpecialType.System_Single: 379case SpecialType.System_Double: 382case SpecialType.System_Decimal: 868info.ValueKind = SpecialType.None; 983info.ValueKind = SpecialType.System_Single; 988info.ValueKind = SpecialType.System_Double; 993info.ValueKind = SpecialType.System_Decimal; 997info.ValueKind = SpecialType.System_Double; 1003info.ValueKind = SpecialType.System_Single; 1008info.ValueKind = SpecialType.System_Double; 1013info.ValueKind = SpecialType.System_Decimal; 1057case SpecialType.System_Single: 1060case SpecialType.System_Double: 1063case SpecialType.System_Decimal: 1089info.ValueKind = SpecialType.System_Int32; 1094info.ValueKind = SpecialType.System_UInt32; 1102info.ValueKind = SpecialType.System_Int64; 1107info.ValueKind = SpecialType.System_UInt64; 1119info.ValueKind = SpecialType.System_UInt32; 1124info.ValueKind = SpecialType.System_UInt64; 1134info.ValueKind = SpecialType.System_Int64; 1139info.ValueKind = SpecialType.System_UInt64; 1151info.ValueKind = SpecialType.System_UInt64; 2680info.ValueKind = SpecialType.System_Int32;
SymbolDisplay\SymbolDisplayVisitor.Types.cs (18)
684case SpecialType.System_Void: 686case SpecialType.System_SByte: 688case SpecialType.System_Int16: 690case SpecialType.System_Int32: 692case SpecialType.System_Int64: 694case SpecialType.System_IntPtr when symbol.IsNativeIntegerType: 696case SpecialType.System_UIntPtr when symbol.IsNativeIntegerType: 698case SpecialType.System_Byte: 700case SpecialType.System_UInt16: 702case SpecialType.System_UInt32: 704case SpecialType.System_UInt64: 706case SpecialType.System_Single: 708case SpecialType.System_Double: 710case SpecialType.System_Decimal: 712case SpecialType.System_Char: 714case SpecialType.System_Boolean: 716case SpecialType.System_String: 718case SpecialType.System_Object:
SymbolDisplay\SymbolDisplayVisitor_Constants.cs (5)
34protected override void AddExplicitlyCastedLiteralValue(INamedTypeSymbol namedType, SpecialType type, object value) 42protected override void AddLiteralValue(SpecialType type, object value) 51case SpecialType.System_Boolean: 55case SpecialType.System_String: 56case SpecialType.System_Char:
Symbols\AbstractTypeMap.cs (1)
391dynamicEraser = new DynamicTypeEraser(owner.ContainingAssembly.CorLibrary.GetSpecialType(SpecialType.System_Object));
Symbols\AnonymousTypes\AnonymousTypeManager.SymbolCollection.cs (7)
111get { return Compilation.GetSpecialType(SpecialType.System_Object); } 116get { return Compilation.GetSpecialType(SpecialType.System_Void); } 121get { return Compilation.GetSpecialType(SpecialType.System_Boolean); } 126get { return Compilation.GetSpecialType(SpecialType.System_String); } 131get { return Compilation.GetSpecialType(SpecialType.System_Int32); } 136get { return Compilation.GetSpecialType(SpecialType.System_IntPtr); } 141get { return Compilation.GetSpecialType(SpecialType.System_MulticastDelegate); }
Symbols\AnonymousTypes\AnonymousTypeManager.Templates.cs (4)
178Compilation.GetSpecialType(SpecialType.System_IntPtr), 179returnsVoid ? Compilation.GetSpecialType(SpecialType.System_Void) : null, 474Compilation.GetSpecialType(SpecialType.System_IntPtr), 475returnsVoid ? Compilation.GetSpecialType(SpecialType.System_Void) : null,
Symbols\ArrayTypeSymbol.cs (4)
73return CreateMDArray(elementType, rank, sizes, lowerBounds, declaringAssembly.GetSpecialType(SpecialType.System_Array)); 95return CreateSZArray(elementType, declaringAssembly.GetSpecialType(SpecialType.System_Array), GetSZArrayInterfaces(elementType, declaringAssembly)); 113var iListOfT = declaringAssembly.GetSpecialType(SpecialType.System_Collections_Generic_IList_T); 119var iReadOnlyListOfT = declaringAssembly.GetSpecialType(SpecialType.System_Collections_Generic_IReadOnlyList_T);
Symbols\AssemblySymbol.cs (4)
500Debug.Assert(SpecialMembers.GetDescriptor(feature).DeclaringSpecialType == SpecialType.System_Runtime_CompilerServices_RuntimeFeature); 501return GetSpecialType(SpecialType.System_Runtime_CompilerServices_RuntimeFeature) is { TypeKind: TypeKind.Class, IsStatic: true } && 524GetSpecialType(SpecialType.System_Runtime_CompilerServices_PreserveBaseOverridesAttribute) is { TypeKind: TypeKind.Class }; 625return GetSpecialType(SpecialType.System_Object);
Symbols\Attributes\AttributeData.cs (12)
261string? memberName = value.DecodeValue<string>(SpecialType.System_String); 273var memberName = member.DecodeValue<string>(SpecialType.System_String); 309var sense = arguments.Attribute.CommonConstructorArguments[0].DecodeValue<bool>(SpecialType.System_Boolean); 312var memberName = value.DecodeValue<string>(SpecialType.System_String); 324var memberName = member.DecodeValue<string>(SpecialType.System_String); 559if (property.TypeWithAnnotations.HasType && property.Type.SpecialType == SpecialType.System_String && 578ctorArgument.DecodeValue<ClassInterfaceType>(SpecialType.System_Enum) : 579(ClassInterfaceType)ctorArgument.DecodeValue<short>(SpecialType.System_Int16); 603ctorArgument.DecodeValue<ComInterfaceType>(SpecialType.System_Enum) : 604(ComInterfaceType)ctorArgument.DecodeValue<short>(SpecialType.System_Int16); 653if (member is PropertySymbol { Type: { SpecialType: SpecialType.System_String } }) 807return arguments.Length == 1 && arguments[0].TryDecodeValue(SpecialType.System_String, out string? value) ? value : null;
Symbols\Attributes\SourceAttributeData.cs (15)
283SpecialType specType = parameterType.SpecialType; 326if (specType != SpecialType.System_Boolean) 334if (specType != SpecialType.System_Char) 342if (specType != SpecialType.System_SByte) 350if (specType != SpecialType.System_Byte) 358if (specType != SpecialType.System_Int16) 366if (specType != SpecialType.System_UInt16) 374if (specType != SpecialType.System_Int32) 382if (specType != SpecialType.System_UInt32) 390if (specType != SpecialType.System_Int64) 398if (specType != SpecialType.System_UInt64) 406if (specType != SpecialType.System_Single) 414if (specType != SpecialType.System_Double) 422if (specType != SpecialType.System_String) 430if (specType != SpecialType.System_Object)
Symbols\Compilation_WellKnownMembers.cs (8)
464var systemByte = GetSpecialType(SpecialType.System_Byte); 467var systemUnit32 = GetSpecialType(SpecialType.System_UInt32); 483var ticks = new TypedConstant(GetSpecialType(SpecialType.System_Int64), TypedConstantKind.Primitive, value.Ticks); 788NamedTypeSymbol booleanType = GetSpecialType(SpecialType.System_Boolean); 802var stringType = GetSpecialType(SpecialType.System_String); 816var boolType = GetSpecialType(SpecialType.System_Boolean); 1053case SpecialType.System_IntPtr: 1054case SpecialType.System_UIntPtr:
Symbols\ConstantValueUtils.cs (1)
112typeSymbol.SpecialType != SpecialType.System_String)
Symbols\ConstraintsHelper.cs (15)
111switch (typeParameter.HasReferenceTypeConstraint ? SpecialType.None : (bounds?.EffectiveBaseClass.SpecialType ?? SpecialType.System_Object)) 113case SpecialType.System_Object: 114case SpecialType.System_ValueType: 115case SpecialType.System_Enum: 143NamedTypeSymbol effectiveBaseClass = corLibrary.GetSpecialType(typeParameter.HasValueTypeConstraint ? SpecialType.System_ValueType : SpecialType.System_Object); 258constraintEffectiveBase = corLibrary.GetSpecialType(SpecialType.System_ValueType); 264constraintEffectiveBase = corLibrary.GetSpecialType(SpecialType.System_Enum); 270constraintEffectiveBase = corLibrary.GetSpecialType(SpecialType.System_Array); 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); 1657if (type.SpecialType == SpecialType.System_Object)
Symbols\DynamicTypeSymbol.cs (2)
195return (int)Microsoft.CodeAnalysis.SpecialType.System_Object; 213return (object?)other != null && other.SpecialType == Microsoft.CodeAnalysis.SpecialType.System_Object;
Symbols\Extensions\SynthesizedExtensionMarker.cs (1)
53return (TypeWithAnnotations.Create(Binder.GetSpecialType(DeclaringCompilation, SpecialType.System_Void, GetFirstLocation(), diagnostics)),
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 (3)
145PeekFlag() && (type.SpecialType != SpecialType.System_Object && !type.IsDynamic())) 155if (type.SpecialType == SpecialType.System_Object) 176: _containingAssembly.GetSpecialType(SpecialType.System_Object);
Symbols\Metadata\PE\MetadataDecoder.cs (5)
177return new MissingMetadataTypeSymbol.TopLevel(new MissingModuleSymbolWithName(moduleSymbol.ContainingAssembly, moduleName), ref emittedName, SpecialType.None); 422SpecialType baseSpecialType = (candidate.BaseTypeNoUseSiteDiagnostics?.SpecialType ?? SpecialType.None); 423if (baseSpecialType == SpecialType.None || baseSpecialType != (baseType?.SpecialType ?? SpecialType.None))
Symbols\Metadata\PE\NativeIntegerTypeDecoder.cs (3)
18if (containingType?.SpecialType == SpecialType.System_Runtime_CompilerServices_RuntimeFeature 114case SpecialType.System_IntPtr: 115case SpecialType.System_UIntPtr:
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 (40)
367_corTypeId = SpecialType.None; 1971SpecialType baseCorTypeId = @base.SpecialType; 1975case SpecialType.System_Enum: 1980case SpecialType.System_MulticastDelegate: 1985case SpecialType.System_ValueType: 1987if (this.SpecialType != SpecialType.System_Enum) 1994case SpecialType.System_Object: 2166if (this.SpecialType == Microsoft.CodeAnalysis.SpecialType.None) 2173case SpecialType.System_Void: 2174case SpecialType.System_Boolean: 2175case SpecialType.System_Char: 2176case SpecialType.System_Byte: 2177case SpecialType.System_SByte: 2178case SpecialType.System_Int16: 2179case SpecialType.System_UInt16: 2180case SpecialType.System_Int32: 2181case SpecialType.System_UInt32: 2182case SpecialType.System_Int64: 2183case SpecialType.System_UInt64: 2184case SpecialType.System_Single: 2185case SpecialType.System_Double: 2186case SpecialType.System_Decimal: 2187case SpecialType.System_IntPtr: 2188case SpecialType.System_UIntPtr: 2189case SpecialType.System_DateTime: 2190case SpecialType.System_TypedReference: 2191case SpecialType.System_ArgIterator: 2192case SpecialType.System_RuntimeArgumentHandle: 2193case SpecialType.System_RuntimeFieldHandle: 2194case SpecialType.System_RuntimeMethodHandle: 2195case SpecialType.System_RuntimeTypeHandle: 2247var isOrdinaryEmbeddableStruct = (this.TypeKind == TypeKind.Struct) && (this.SpecialType == Microsoft.CodeAnalysis.SpecialType.None) && this.ContainingAssembly.IsLinked; 2393else if (TypeKind == TypeKind.Class && SpecialType != SpecialType.System_Enum) 2396if (@base?.SpecialType == SpecialType.None && @base.ContainingAssembly?.IsMissing == true) 2402switch ((SpecialType)SpecialTypes.GetTypeFromMetadataName(emittedName)) 2404case SpecialType.System_Enum: 2405case SpecialType.System_MulticastDelegate: 2406case SpecialType.System_ValueType: 2851Debug.Assert(this.SpecialType == SpecialType.System_IntPtr || this.SpecialType == SpecialType.System_UIntPtr);
Symbols\Metadata\PE\PETypeParameterSymbol.cs (4)
274else if (typeSymbol.SpecialType == SpecialType.System_ValueType) 292if (typeSymbol.SpecialType == SpecialType.System_ValueType && ((_flags & GenericParameterAttributes.NotNullableValueTypeConstraint) != 0)) 546Debug.Assert(type.HasType && type.SpecialType == SpecialType.System_Object); 710return this.ContainingAssembly.GetSpecialType(SpecialType.System_Object);
Symbols\Metadata\PE\SymbolFactory.cs (1)
29internal override TypeSymbol GetSpecialType(PEModuleSymbol moduleSymbol, SpecialType specialType)
Symbols\MetadataOrSourceAssemblySymbol.cs (3)
83Debug.Assert(typeId != SpecialType.None); 146SpecialType.System_IntPtr => 0, 147SpecialType.System_UIntPtr => 1,
Symbols\MethodSymbol.cs (3)
1285new TypedConstant(declaringCompilation.GetSpecialType(SpecialType.System_String), TypedConstantKind.Primitive, PEModule.RequiredMembersMarker), // message 1286new TypedConstant(declaringCompilation.GetSpecialType(SpecialType.System_Boolean), TypedConstantKind.Primitive, true)) // error 1291ImmutableArray.Create(new TypedConstant(declaringCompilation.GetSpecialType(SpecialType.System_String), TypedConstantKind.Primitive, nameof(CompilerFeatureRequiredFeatures.RequiredMembers)))
Symbols\MethodSymbolExtensions.cs (1)
61else if (method.ContainingType.SpecialType == SpecialType.System_Object)
Symbols\MissingMetadataTypeSymbol.cs (9)
149/// Either <see cref="SpecialType"/>, <see cref="InternalSpecialType"/>, <see cref="WellKnownType"/>, or -1 if not initialized. 196RoslynDebug.Assert(typeId == -1 || typeId == (int)SpecialType.None || arity == 0 || mangleName); 313return (typeId >= (int)WellKnownType.First) ? SpecialType.None : (ExtendedSpecialType)typeId; 323var errorInfo = this.TypeId != (int)SpecialType.None ? 335if (this.SpecialType == Microsoft.CodeAnalysis.SpecialType.System_Object) 337return (int)Microsoft.CodeAnalysis.SpecialType.System_Object; 347Debug.Assert(this.SpecialType == SpecialType.System_IntPtr || this.SpecialType == SpecialType.System_UIntPtr); 377this.SpecialType == Microsoft.CodeAnalysis.SpecialType.System_Object)
Symbols\NamedTypeSymbol.cs (3)
790if (this.SpecialType == SpecialType.System_Object) 792return (int)SpecialType.System_Object; 812if (this.SpecialType == SpecialType.System_Object)
Symbols\NativeIntegerTypeSymbol.cs (5)
34Debug.Assert(underlyingType.SpecialType == SpecialType.System_IntPtr || underlyingType.SpecialType == SpecialType.System_UIntPtr); 306private readonly SpecialType _specialType; 313Debug.Assert(_specialType == SpecialType.System_IntPtr || _specialType == SpecialType.System_UIntPtr);
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 (2)
189int offset = attribute.CommonConstructorArguments[0].DecodeValue<int>(SpecialType.System_Int32); 275if (this.Type.SpecialType == SpecialType.System_Decimal)
Symbols\Source\ImplicitNamedTypeSymbol.cs (2)
57=> IsScriptClass ? null : this.DeclaringCompilation.GetSpecialType(Microsoft.CodeAnalysis.SpecialType.System_Object); 63diagnostics.ReportUseSite(this.DeclaringCompilation.GetSpecialType(SpecialType.System_Object), GetFirstLocation());
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 (20)
1831var boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 1894var obj = GetSpecialType(SpecialType.System_Object); 1969var int32Type = _compilation.GetSpecialType(SpecialType.System_Int32); 1989var boolType = _compilation.GetSpecialType(SpecialType.System_Boolean); 2023var stringType = _compilation.GetSpecialType(SpecialType.System_String); 2033var stringType = _compilation.GetSpecialType(SpecialType.System_String); 2547wrapNonExceptionThrows = namedArg.Value.DecodeValue<bool>(SpecialType.System_Boolean); 2601int arg = attribute.GetConstructorArgument<int>(i, SpecialType.System_Int32); 2787case SpecialType.System_Boolean: 2789case SpecialType.System_Byte: 2790case SpecialType.System_Decimal: 2791case SpecialType.System_Double: 2792case SpecialType.System_Int16: 2793case SpecialType.System_Int32: 2794case SpecialType.System_Int64: 2795case SpecialType.System_SByte: 2796case SpecialType.System_Single: 2797case SpecialType.System_UInt16: 2798case SpecialType.System_UInt32: 2799case SpecialType.System_UInt64:
Symbols\Source\SourceComplexParameterSymbol.cs (9)
679if (constructorArguments[0].TryDecodeValue(SpecialType.System_String, out string? parameterName)) 884return arguments.Length == 1 && arguments[0].TryDecodeValue(SpecialType.System_Boolean, out bool value) ? 977SpecialType specialType = arg.Kind == TypedConstantKind.Enum ? 1070TypeSymbol intType = compilation.GetSpecialType(SpecialType.System_Int32); 1098TypeSymbol stringType = compilation.GetSpecialType(SpecialType.System_String); 1131TypeSymbol stringType = compilation.GetSpecialType(SpecialType.System_String); 1172TypeSymbol stringType = compilation.GetSpecialType(SpecialType.System_String); 1331if (constant.TypeInternal is not { SpecialType: SpecialType.System_String }) 1337var name = constant.DecodeValue<string>(SpecialType.System_String);
Symbols\Source\SourceConstructorSymbolBase.cs (1)
59_lazyReturnType = TypeWithAnnotations.Create(bodyBinder.GetSpecialType(SpecialType.System_Void, diagnostics, syntax));
Symbols\Source\SourceDelegateMethodSymbol.cs (7)
60var voidType = TypeWithAnnotations.Create(binder.GetSpecialType(SpecialType.System_Void, diagnostics, syntax)); 62var objectType = TypeWithAnnotations.Create(binder.GetSpecialType(SpecialType.System_Object, diagnostics, syntax)); 63var intPtrType = TypeWithAnnotations.Create(binder.GetSpecialType(SpecialType.System_IntPtr, diagnostics, syntax)); 80if (binder.Compilation.GetSpecialType(SpecialType.System_IAsyncResult).TypeKind != TypeKind.Error && 81binder.Compilation.GetSpecialType(SpecialType.System_AsyncCallback).TypeKind != TypeKind.Error && 85var iAsyncResultType = TypeWithAnnotations.Create(binder.GetSpecialType(SpecialType.System_IAsyncResult, diagnostics, syntax)); 86var asyncCallbackType = TypeWithAnnotations.Create(binder.GetSpecialType(SpecialType.System_AsyncCallback, diagnostics, syntax));
Symbols\Source\SourceDestructorSymbol.cs (1)
86_lazyReturnType = TypeWithAnnotations.Create(bodyBinder.GetSpecialType(SpecialType.System_Void, diagnostics, syntax));
Symbols\Source\SourceEnumConstantSymbol.cs (1)
157var constantType = this.ContainingType.EnumUnderlyingType.SpecialType;
Symbols\Source\SourceEventAccessorSymbol.cs (2)
131TypeSymbol voidType = compilation.GetSpecialType(SpecialType.System_Void); 142TypeSymbol voidType = compilation.GetSpecialType(SpecialType.System_Void);
Symbols\Source\SourceFieldSymbol.cs (1)
89CSharpCustomModifier.CreateRequired(this.ContainingAssembly.GetSpecialType(SpecialType.System_Runtime_CompilerServices_IsVolatile)));
Symbols\Source\SourceFixedFieldSymbol.cs (3)
47var intType = compilation.GetSpecialType(SpecialType.System_Int32); 90TypeSymbol intType = binder.GetSpecialType(SpecialType.System_Int32, diagnostics, sizeExpression); 238=> ContainingAssembly.GetSpecialType(SpecialType.System_ValueType);
Symbols\Source\SourceMemberContainerSymbol.cs (10)
113Debug.Assert(EnumUtilities.ContainsAllValues<SpecialType>(SpecialTypeMask)); 2971if (method.IsOverride && method.GetConstructedLeastOverriddenMethod(this, requireSameReturnType: false).ContainingType.SpecialType == Microsoft.CodeAnalysis.SpecialType.System_Object) 4915TypeWithAnnotations.Create(compilation.GetSpecialType(SpecialType.System_Void)), 4932if (deconstruct.ReturnType.SpecialType != SpecialType.System_Void && !deconstruct.ReturnType.IsErrorType()) 4963TypeWithAnnotations.Create(compilation.GetSpecialType(SpecialType.System_Void)), 5015returnType: TypeWithAnnotations.Create(compilation.GetSpecialType(SpecialType.System_Boolean)), 5070returnType: TypeWithAnnotations.Create(compilation.GetSpecialType(SpecialType.System_String)), 5244TypeWithAnnotations.Create(compilation.GetSpecialType(SpecialType.System_Int32)), 5343TypeWithAnnotations.Create(compilation.GetSpecialType(SpecialType.System_Boolean)), 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\SourceMethodSymbol.cs (1)
231ImmutableArray.Create(new TypedConstant(compilation.GetSpecialType(SpecialType.System_String), TypedConstantKind.Primitive, nameof(CompilerFeatureRequiredFeatures.UserDefinedCompoundAssignmentOperators)))
Symbols\Source\SourceMethodSymbolWithAttributes.cs (13)
344string? name = attributeData.GetConstructorArgument<string>(0, SpecialType.System_String); 754string name = attribute.GetConstructorArgument<string>(0, SpecialType.System_String); 848string? moduleName = attribute.GetConstructorArgument<string>(0, SpecialType.System_String); 890charSet = namedArg.Value.DecodeValue<CharSet>(SpecialType.System_Enum); 895setLastError = namedArg.Value.DecodeValue<bool>(SpecialType.System_Boolean); 900exactSpelling = namedArg.Value.DecodeValue<bool>(SpecialType.System_Boolean); 904preserveSig = namedArg.Value.DecodeValue<bool>(SpecialType.System_Boolean); 909callingConvention = namedArg.Value.DecodeValue<CallingConvention>(SpecialType.System_Enum); 913bestFitMapping = namedArg.Value.DecodeValue<bool>(SpecialType.System_Boolean); 917throwOnUnmappable = namedArg.Value.DecodeValue<bool>(SpecialType.System_Boolean); 995{ Type.SpecialType: SpecialType.System_String }, 1003Debug.Assert(arguments.Attribute.AttributeConstructor.Parameters is [{ Type.SpecialType: SpecialType.System_Int32 }, { Type.SpecialType: SpecialType.System_String }]);
Symbols\Source\SourceModuleSymbol.cs (3)
570CharSet charSet = attribute.GetConstructorArgument<CharSet>(0, SpecialType.System_Enum); 650var version = ImmutableArray.Create(new TypedConstant(compilation.GetSpecialType(SpecialType.System_Int32), TypedConstantKind.Primitive, 11)); 657new TypedConstant(compilation.GetSpecialType(SpecialType.System_Boolean), TypedConstantKind.Primitive, _assemblySymbol.InternalsAreVisible));
Symbols\Source\SourceNamedTypeSymbol.cs (15)
943string? name = attributeData.GetConstructorArgument<string>(0, SpecialType.System_String); 1017int length = attributeData.GetConstructorArgument<int>(0, SpecialType.System_Int32); 1037string? methodName = attributeData.GetConstructorArgument<string>(1, SpecialType.System_String); 1056Debug.Assert(this.SpecialType == SpecialType.System_Object || this.DeclaringCompilation.IsAttributeType(this)); 1197string? methodName = attribute.CommonConstructorArguments[1].DecodeValue<string>(SpecialType.System_String); 1209int length = attribute.CommonConstructorArguments[0].DecodeValue<int>(SpecialType.System_Int32); 1402string name = attribute.GetConstructorArgument<string>(0, SpecialType.System_String); 1613if ((object)baseType != null && baseType.SpecialType != SpecialType.System_Object) 1718new TypedConstant(compilation.GetSpecialType(SpecialType.System_String), TypedConstantKind.Primitive, PEModule.ByRefLikeMarker), // message 1719new TypedConstant(compilation.GetSpecialType(SpecialType.System_Boolean), TypedConstantKind.Primitive, true)), // error=true 1724ImmutableArray.Create(new TypedConstant(compilation.GetSpecialType(SpecialType.System_String), TypedConstantKind.Primitive, nameof(CompilerFeatureRequiredFeatures.RefStructs))), 1737var defaultMemberNameConstant = new TypedConstant(compilation.GetSpecialType(SpecialType.System_String), TypedConstantKind.Primitive, defaultMemberName); 1797Debug.Assert(this.SpecialType == SpecialType.System_IntPtr || this.SpecialType == SpecialType.System_UIntPtr); 1896(type.SpecialType == SpecialType.System_Int32 ||
Symbols\Source\SourceNamedTypeSymbol_Bases.cs (19)
473SpecialType baseSpecialType = baseType.SpecialType; 477if (this.SpecialType == SpecialType.System_Enum && baseSpecialType == SpecialType.System_ValueType || 478this.SpecialType == SpecialType.System_MulticastDelegate && baseSpecialType == SpecialType.System_Delegate) 482else if (baseSpecialType == SpecialType.System_Array && this.ContainingAssembly.CorLibrary == this.ContainingAssembly) 528if (this.IsStatic && localBase.SpecialType != SpecialType.System_Object) 622if (this.SpecialType == SpecialType.System_Object && ((object)localBase != null || localInterfaces.Count != 0)) 643private static bool IsRestrictedBaseType(SpecialType specialType) 647case SpecialType.System_Array: 648case SpecialType.System_Enum: 649case SpecialType.System_Delegate: 650case SpecialType.System_MulticastDelegate: 651case SpecialType.System_ValueType: 717declaredBase = compilation.GetSpecialType(SpecialType.System_Enum); 734if (this.SpecialType == SpecialType.System_Object) 739declaredBase = compilation.GetSpecialType(SpecialType.System_Object); 743declaredBase = compilation.GetSpecialType(SpecialType.System_ValueType); 750declaredBase = compilation.GetSpecialType(SpecialType.System_MulticastDelegate);
Symbols\Source\SourceNamedTypeSymbol_Enum.cs (2)
69type = compilation.GetSpecialType(SpecialType.System_Int32); 76NamedTypeSymbol defaultUnderlyingType = compilation.GetSpecialType(SpecialType.System_Int32);
Symbols\Source\SourceNamespaceSymbol.cs (1)
445if ((object)type != null && type.SpecialType != SpecialType.None)
Symbols\Source\SourceOrdinaryMethodSymbol.cs (3)
142if (returnType.SpecialType == SpecialType.System_TypedReference && 143(this.ContainingType.SpecialType == SpecialType.System_TypedReference || this.ContainingType.SpecialType == SpecialType.System_ArgIterator))
Symbols\Source\SourceParameterSymbolBase.cs (1)
91defaultValue.SpecialType == SpecialType.System_Decimal &&
Symbols\Source\SourcePropertyAccessorSymbol.cs (1)
388var type = TypeWithAnnotations.Create(binder.GetSpecialType(SpecialType.System_Void, diagnostics, this.GetSyntax()));
Symbols\Source\SourcePropertySymbolBase.cs (2)
1465string? indexerName = attributeData.CommonConstructorArguments[0].DecodeValue<string>(SpecialType.System_String); 1726string indexerName = attribute.CommonConstructorArguments[0].DecodeValue<string>(SpecialType.System_String);
Symbols\Source\SourceTypeParameterSymbol.cs (1)
347return this.ContainingAssembly.GetSpecialType(SpecialType.System_Object);
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\SpecialTypeExtensions.cs (29)
11public static bool CanBeConst(this SpecialType specialType) 15case SpecialType.System_Boolean: 16case SpecialType.System_Char: 17case SpecialType.System_SByte: 18case SpecialType.System_Int16: 19case SpecialType.System_Int32: 20case SpecialType.System_Int64: 21case SpecialType.System_Byte: 22case SpecialType.System_UInt16: 23case SpecialType.System_UInt32: 24case SpecialType.System_UInt64: 25case SpecialType.System_Single: 26case SpecialType.System_Double: 27case SpecialType.System_Decimal: 28case SpecialType.System_String: 35public static bool IsValidVolatileFieldType(this SpecialType specialType) 39case SpecialType.System_Byte: 40case SpecialType.System_SByte: 41case SpecialType.System_Int16: 42case SpecialType.System_UInt16: 43case SpecialType.System_Int32: 44case SpecialType.System_UInt32: 45case SpecialType.System_Char: 46case SpecialType.System_Single: 47case SpecialType.System_Boolean: 48case SpecialType.System_IntPtr: 49case SpecialType.System_UIntPtr: 56public static int FixedBufferElementSizeInBytes(this SpecialType specialType) 60return specialType == SpecialType.System_Decimal ? 0 : specialType.SizeInBytes();
Symbols\Symbol.cs (1)
1297modifierType.SpecialType == SpecialType.System_Runtime_CompilerServices_IsVolatile)
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListEnumeratorTypeSymbol.cs (5)
33_moveNextCalledField = new SynthesizedFieldSymbol(this, compilation.GetSpecialType(SpecialType.System_Boolean), "_moveNextCalled", isReadOnly: false); 35var iDisposable = compilation.GetSpecialType(SpecialType.System_IDisposable); 36var iEnumerator = compilation.GetSpecialType(SpecialType.System_Collections_IEnumerator); 37var iEnumeratorT = compilation.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerator_T).Construct(typeArgs); 200internal override NamedTypeSymbol BaseTypeNoUseSiteDiagnostics => ContainingAssembly.GetSpecialType(SpecialType.System_Object);
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListTypeParameterSymbol.cs (2)
61internal override TypeSymbol GetDeducedBaseType(ConsList<TypeParameterSymbol> inProgress) => ContainingAssembly.GetSpecialType(SpecialType.System_Object); 63internal override NamedTypeSymbol GetEffectiveBaseClass(ConsList<TypeParameterSymbol> inProgress) => ContainingAssembly.GetSpecialType(SpecialType.System_Object);
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListTypeSymbol.cs (23)
57private static readonly SpecialType[] s_requiredSpecialTypes = new[] 59SpecialType.System_Collections_IEnumerable, 60SpecialType.System_Collections_Generic_IEnumerable_T, 61SpecialType.System_Collections_Generic_ICollection_T, 62SpecialType.System_Collections_Generic_IList_T, 65private static readonly SpecialType[] s_readOnlyInterfacesSpecialTypes = new[] 67SpecialType.System_Collections_Generic_IReadOnlyCollection_T, 68SpecialType.System_Collections_Generic_IReadOnlyList_T, 134compilation.GetSpecialType(SpecialType.System_Collections_Generic_IReadOnlyCollection_T) is not MissingMetadataTypeSymbol && 135compilation.GetSpecialType(SpecialType.System_Collections_Generic_IReadOnlyList_T) is not MissingMetadataTypeSymbol; 137foreach (var type in s_requiredSpecialTypes) 148foreach (var type in s_readOnlyInterfacesSpecialTypes) 287var iEnumerable = compilation.GetSpecialType(SpecialType.System_Collections_IEnumerable); 290var iEnumerableT = compilation.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T).Construct(typeArgs); 291var iReadOnlyCollectionT = compilation.GetSpecialType(SpecialType.System_Collections_Generic_IReadOnlyCollection_T).Construct(typeArgs); 292var iReadOnlyListT = compilation.GetSpecialType(SpecialType.System_Collections_Generic_IReadOnlyList_T).Construct(typeArgs); 293var iCollectionT = compilation.GetSpecialType(SpecialType.System_Collections_Generic_ICollection_T).Construct(typeArgs); 294var iListT = compilation.GetSpecialType(SpecialType.System_Collections_Generic_IList_T).Construct(typeArgs); 609f.Convert(f.SpecialType(SpecialType.System_Object), fieldReference), 788&& compilation.GetSpecialType(SpecialType.System_IDisposable) is not MissingMetadataTypeSymbol 789&& compilation.GetSpecialType(SpecialType.System_Collections_IEnumerator) is not MissingMetadataTypeSymbol 790&& compilation.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerator_T) is not MissingMetadataTypeSymbol 877internal override NamedTypeSymbol BaseTypeNoUseSiteDiagnostics => ContainingAssembly.GetSpecialType(SpecialType.System_Object);
Symbols\Synthesized\Records\SynthesizedRecordBaseEquals.cs (2)
29return (ReturnType: TypeWithAnnotations.Create(Binder.GetSpecialType(compilation, SpecialType.System_Boolean, location, diagnostics)), 68F.Convert(F.SpecialType(SpecialType.System_Object), F.Parameter(parameter)));
Symbols\Synthesized\Records\SynthesizedRecordDeconstruct.cs (1)
35return (ReturnType: TypeWithAnnotations.Create(Binder.GetSpecialType(compilation, SpecialType.System_Void, location, diagnostics)),
Symbols\Synthesized\Records\SynthesizedRecordEqualityOperator.cs (2)
46candidate.ReturnType.SpecialType == SpecialType.System_Boolean && !candidate.IsStatic && 72BoundExpression recordEquals = F.LogicalAnd(F.ObjectNotEqual(left, F.Null(F.SpecialType(SpecialType.System_Object))),
Symbols\Synthesized\Records\SynthesizedRecordEqualityOperatorBase.cs (1)
71return (ReturnType: TypeWithAnnotations.Create(Binder.GetSpecialType(compilation, SpecialType.System_Boolean, location, diagnostics)),
Symbols\Synthesized\Records\SynthesizedRecordEquals.cs (3)
37return (ReturnType: TypeWithAnnotations.Create(Binder.GetSpecialType(compilation, SpecialType.System_Boolean, location, diagnostics)), 94retExpr = F.ObjectNotEqual(other, F.Null(F.SpecialType(SpecialType.System_Object))); 108baseEquals.ReturnType.SpecialType != SpecialType.System_Boolean)
Symbols\Synthesized\Records\SynthesizedRecordGetHashCode.cs (2)
34return (ReturnType: TypeWithAnnotations.Create(Binder.GetSpecialType(compilation, SpecialType.System_Int32, location, diagnostics)), 81if (overridden is null || overridden.ReturnType.SpecialType != SpecialType.System_Int32)
Symbols\Synthesized\Records\SynthesizedRecordObjEquals.cs (3)
32return (ReturnType: TypeWithAnnotations.Create(Binder.GetSpecialType(compilation, SpecialType.System_Boolean, location, diagnostics)), 35TypeWithAnnotations.Create(Binder.GetSpecialType(compilation, SpecialType.System_Object, location, diagnostics), annotation), 47if (_typedRecordEquals.ReturnType.SpecialType != SpecialType.System_Boolean)
Symbols\Synthesized\Records\SynthesizedRecordPrintMembers.cs (3)
94return (ReturnType: TypeWithAnnotations.Create(Binder.GetSpecialType(compilation, SpecialType.System_Boolean, location, diagnostics)), 158basePrintMethod.ReturnType.SpecialType != SpecialType.System_Boolean) 222F.Convert(F.SpecialType(SpecialType.System_Object), value))));
Symbols\Synthesized\Records\SynthesizedRecordToString.cs (1)
43return (ReturnType: TypeWithAnnotations.Create(Binder.GetSpecialType(compilation, SpecialType.System_String, location, diagnostics), annotation),
Symbols\Synthesized\SynthesizedContainer.cs (2)
161internal override NamedTypeSymbol BaseTypeNoUseSiteDiagnostics => ContainingAssembly.GetSpecialType(this.TypeKind == TypeKind.Struct ? SpecialType.System_ValueType : SpecialType.System_Object);
Symbols\Synthesized\SynthesizedEntryPointSymbol.cs (3)
33var systemObject = Binder.GetSpecialType(compilation, SpecialType.System_Object, DummySyntax(), diagnostics); 43var systemVoid = Binder.GetSpecialType(compilation, SpecialType.System_Void, DummySyntax(), diagnostics); 380ReturnType.SpecialType == SpecialType.System_Int32);
Symbols\Synthesized\SynthesizedFieldSymbolBase.cs (1)
75compilation.CanEmitSpecialType(SpecialType.System_String))
Symbols\Synthesized\SynthesizedInlineArrayTypeSymbol.cs (4)
131internal override NamedTypeSymbol BaseTypeNoUseSiteDiagnostics => ContainingAssembly.GetSpecialType(SpecialType.System_ValueType); 208arguments: ImmutableArray.Create(new TypedConstant(compilation.GetSpecialType(SpecialType.System_Int32), TypedConstantKind.Primitive, _arrayLength)), 261internal override TypeSymbol GetDeducedBaseType(ConsList<TypeParameterSymbol> inProgress) => ContainingAssembly.GetSpecialType(SpecialType.System_Object); 263internal override NamedTypeSymbol GetEffectiveBaseClass(ConsList<TypeParameterSymbol> inProgress) => ContainingAssembly.GetSpecialType(SpecialType.System_Object);
Symbols\Synthesized\SynthesizedInstanceConstructor.cs (1)
156get { return TypeWithAnnotations.Create(ContainingAssembly.GetSpecialType(SpecialType.System_Void)); }
Symbols\Synthesized\SynthesizedInteractiveInitializerMethod.cs (1)
274? compilation.GetSpecialType(SpecialType.System_Object)
Symbols\Synthesized\SynthesizedParameterSymbol.cs (3)
173compilation.CanEmitSpecialType(SpecialType.System_String)) 215SpecialType.System_Decimal => compilation.SynthesizeDecimalConstantAttribute(defaultValue.DecimalValue), 216SpecialType.System_DateTime => compilation.SynthesizeDateTimeConstantAttribute(defaultValue.DateTimeValue),
Symbols\Synthesized\SynthesizedSimpleProgramEntryPointSymbol.cs (4)
45_returnType = Binder.GetSpecialType(compilation, SpecialType.System_Void, NoLocation.Singleton, diagnostics); 49Construct(Binder.GetSpecialType(compilation, SpecialType.System_Int32, NoLocation.Singleton, diagnostics)); 52_returnType = Binder.GetSpecialType(compilation, SpecialType.System_Int32, NoLocation.Singleton, diagnostics); 59TypeWithAnnotations.Create(Binder.GetSpecialType(compilation, SpecialType.System_String, NoLocation.Singleton, diagnostics)))), 0, RefKind.None, "args"));
Symbols\Synthesized\SynthesizedStaticConstructor.cs (1)
139return TypeWithAnnotations.Create(ContainingAssembly.GetSpecialType(SpecialType.System_Void));
Symbols\Synthesized\SynthesizedSubmissionConstructor.cs (1)
24var submissionArrayType = compilation.CreateArrayTypeSymbol(compilation.GetSpecialType(SpecialType.System_Object));
Symbols\Synthesized\SynthesizedThrowSwitchExpressionExceptionMethod.cs (1)
33Debug.Assert(unmatchedValue.Type.SpecialType == SpecialType.System_Object);
Symbols\TypedConstantExtensions.cs (4)
30if (constant.Kind == TypedConstantKind.Type || constant.TypeInternal!.SpecialType == SpecialType.System_Object) 52SpecialType splType = ((INamedTypeSymbol)constant.Type!).EnumUnderlyingType!.SpecialType; 67private static string DisplayUnsignedEnumConstant(TypedConstant constant, SpecialType specialType, ulong constantToDecode, string typeName) 146private static string DisplaySignedEnumConstant(TypedConstant constant, SpecialType specialType, long constantToDecode, string typeName)
Symbols\TypeParameterSymbol.cs (3)
422case SpecialType.System_Object: 423case SpecialType.System_ValueType: 424case SpecialType.System_Enum:
Symbols\TypeSymbol.cs (5)
501public SpecialType SpecialType => (SpecialType)ExtendedSpecialType; 571|| (SpecialType is SpecialType.System_IntPtr or SpecialType.System_UIntPtr && this.ContainingAssembly.RuntimeSupportsNumericIntPtr); 2520SpecialType ITypeSymbolInternal.SpecialType => this.SpecialType;
Symbols\TypeSymbolExtensions.cs (100)
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; 384SpecialType.System_Collections_Generic_IEnumerable_T or 385SpecialType.System_Collections_Generic_IReadOnlyCollection_T or 386SpecialType.System_Collections_Generic_IReadOnlyList_T or 387SpecialType.System_Collections_Generic_ICollection_T or 388SpecialType.System_Collections_Generic_IList_T, 526SpecialType st = t.SpecialType; 528if (st == SpecialType.System_Collections_Generic_IList_T || 529st == SpecialType.System_Collections_Generic_ICollection_T || 530st == SpecialType.System_Collections_Generic_IEnumerable_T || 531st == SpecialType.System_Collections_Generic_IReadOnlyList_T || 532st == SpecialType.System_Collections_Generic_IReadOnlyCollection_T) 647case SpecialType.System_SByte: 648case SpecialType.System_Byte: 649case SpecialType.System_Int16: 650case SpecialType.System_UInt16: 651case SpecialType.System_Int32: 652case SpecialType.System_UInt32: 653case SpecialType.System_Int64: 654case SpecialType.System_UInt64: 655case SpecialType.System_IntPtr when type.IsNativeIntegerType: 656case SpecialType.System_UIntPtr when type.IsNativeIntegerType: 657case SpecialType.System_Char: 658case SpecialType.System_Boolean: 659case SpecialType.System_Single: 660case SpecialType.System_Double: 661case SpecialType.System_Decimal: 669public static SpecialType GetSpecialTypeSafe(this TypeSymbol? type) 671return type is object ? type.SpecialType : SpecialType.None; 1347case SpecialType.System_SByte: 1348case SpecialType.System_Byte: 1349case SpecialType.System_Int16: 1350case SpecialType.System_UInt16: 1351case SpecialType.System_Int32: 1352case SpecialType.System_UInt32: 1353case SpecialType.System_Int64: 1354case SpecialType.System_UInt64: 1355case SpecialType.System_Char: 1356case SpecialType.System_String: 1359case SpecialType.System_Boolean: 1401&& arguments[0].SpecialType == SpecialType.System_Char; 1412&& arguments[0].SpecialType == SpecialType.System_Char; 1423&& arguments[0].SpecialType == SpecialType.System_Char; 1440case SpecialType.System_TypedReference: 1441case SpecialType.System_ArgIterator: 1442case SpecialType.System_RuntimeArgumentHandle: 1453case SpecialType.System_Boolean: 1454case SpecialType.System_Char: 1455case SpecialType.System_SByte: 1456case SpecialType.System_Int16: 1457case SpecialType.System_Int32: 1458case SpecialType.System_Int64: 1459case SpecialType.System_Byte: 1460case SpecialType.System_UInt16: 1461case SpecialType.System_UInt32: 1462case SpecialType.System_UInt64: 1463case SpecialType.System_IntPtr when type.IsNativeIntegerType: 1464case SpecialType.System_UIntPtr when type.IsNativeIntegerType: 1465case SpecialType.System_Single: 1466case SpecialType.System_Double: 1469case SpecialType.System_Decimal: 1651if (type.SpecialType == SpecialType.System_Object) 2225case SpecialType.System_Object: return 0; 2226case SpecialType.System_String: return 1; 2227case SpecialType.System_Boolean: return 2; 2228case SpecialType.System_Char: return 3; 2229case SpecialType.System_SByte: return 4; 2230case SpecialType.System_Int16: return 5; 2231case SpecialType.System_Int32: return 6; 2232case SpecialType.System_Int64: return 7; 2233case SpecialType.System_Byte: return 8; 2234case SpecialType.System_UInt16: return 9; 2235case SpecialType.System_UInt32: return 10; 2236case SpecialType.System_UInt64: return 11; 2237case SpecialType.System_IntPtr when type.IsNativeIntegerType: return 12; 2238case SpecialType.System_UIntPtr when type.IsNativeIntegerType: return 13; 2239case SpecialType.System_Single: return 14; 2240case SpecialType.System_Double: return 15; 2241case SpecialType.System_Decimal: return 16; 2243case SpecialType.None: 2250case SpecialType.System_Boolean: return 17; 2251case SpecialType.System_Char: return 18; 2252case SpecialType.System_SByte: return 19; 2253case SpecialType.System_Int16: return 20; 2254case SpecialType.System_Int32: return 21; 2255case SpecialType.System_Int64: return 22; 2256case SpecialType.System_Byte: return 23; 2257case SpecialType.System_UInt16: return 24; 2258case SpecialType.System_UInt32: return 25; 2259case SpecialType.System_UInt64: return 26; 2260case SpecialType.System_IntPtr when underlyingType.IsNativeIntegerType: return 27; 2261case SpecialType.System_UIntPtr when underlyingType.IsNativeIntegerType: return 28; 2262case SpecialType.System_Single: return 29; 2263case SpecialType.System_Double: return 30; 2264case SpecialType.System_Decimal: return 31;
Symbols\TypeWithAnnotations.cs (9)
223=> Create(compilation.GetSpecialType(SpecialType.System_Nullable_T).Construct(ImmutableArray.Create(typeSymbol))); 272public SpecialType SpecialType => _extensions.GetSpecialType(DefaultType); 865internal abstract SpecialType GetSpecialType(TypeSymbol typeSymbol); 897internal override SpecialType GetSpecialType(TypeSymbol typeSymbol) => typeSymbol.SpecialType; 970internal override SpecialType GetSpecialType(TypeSymbol typeSymbol) => typeSymbol.SpecialType; 1092internal override SpecialType GetSpecialType(TypeSymbol typeSymbol) 1094var specialType = _underlying.SpecialType; 1095return specialType.IsValueType() ? SpecialType.None : specialType; 1203_compilation.GetSpecialType(SpecialType.System_Nullable_T).Construct(ImmutableArray.Create(_underlying)) :
Syntax\SyntaxKindExtensions.cs (17)
11internal static SpecialType GetSpecialType(this SyntaxKind kind) 16return SpecialType.System_Void; 18return SpecialType.System_Boolean; 20return SpecialType.System_Byte; 22return SpecialType.System_SByte; 24return SpecialType.System_Int16; 26return SpecialType.System_UInt16; 28return SpecialType.System_Int32; 30return SpecialType.System_UInt32; 32return SpecialType.System_Int64; 34return SpecialType.System_UInt64; 36return SpecialType.System_Double; 38return SpecialType.System_Single; 40return SpecialType.System_Decimal; 42return SpecialType.System_String; 44return SpecialType.System_Char; 46return SpecialType.System_Object;
Utilities\TypeSymbolExtensions.cs (3)
220if (type.SpecialType == SpecialType.System_Object) 280return compilation.Assembly.GetSpecialType(SpecialType.System_Object); 284return compilation.Assembly.GetSpecialType(SpecialType.System_ValueType);
Utilities\ValueSetFactory.cs (17)
32public static IValueSetFactory? ForSpecialType(SpecialType specialType, bool isNative = false) 36SpecialType.System_Byte => ForByte, 37SpecialType.System_SByte => ForSByte, 38SpecialType.System_Char => ForChar, 39SpecialType.System_Int16 => ForShort, 40SpecialType.System_UInt16 => ForUShort, 41SpecialType.System_Int32 => ForInt, 42SpecialType.System_UInt32 => ForUInt, 43SpecialType.System_Int64 => ForLong, 44SpecialType.System_UInt64 => ForULong, 45SpecialType.System_Boolean => ForBool, 46SpecialType.System_Single => ForFloat, 47SpecialType.System_Double => ForDouble, 48SpecialType.System_String => ForString, 49SpecialType.System_Decimal => ForDecimal, 50SpecialType.System_IntPtr when isNative => ForNint, 51SpecialType.System_UIntPtr when isNative => ForNuint,
Microsoft.CodeAnalysis.CSharp.CodeStyle (58)
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertProgramAnalysis_TopLevelStatements.cs (1)
94if (containingType.BaseType?.SpecialType != SpecialType.System_Object)
src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (2)
392if (methodReference.ContainingType.SpecialType is SpecialType.System_Object or SpecialType.System_ValueType)
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryLambdaExpression\CSharpRemoveUnnecessaryLambdaExpressionDiagnosticAnalyzer.cs (1)
123if (lambdaTypeInfo.ConvertedType == null || lambdaTypeInfo.ConvertedType.SpecialType is SpecialType.System_Object)
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForArrayDiagnosticAnalyzer.cs (2)
101var ienumerableType = convertedType.OriginalDefinition.SpecialType is SpecialType.System_Collections_Generic_IEnumerable_T 104i => i.OriginalDefinition.SpecialType == SpecialType.System_Collections_Generic_IEnumerable_T);
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (6)
305is SpecialType.System_Collections_Generic_IEnumerable_T 306or SpecialType.System_Collections_Generic_IReadOnlyCollection_T 307or SpecialType.System_Collections_Generic_IReadOnlyList_T; 313is SpecialType.System_Collections_Generic_ICollection_T 314or SpecialType.System_Collections_Generic_IList_T; 354var capacityConstructor = GetAccessibleInstanceConstructor(constructors, c => c.Parameters is [{ Name: "capacity", Type.SpecialType: SpecialType.System_Int32 }]);
src\Analyzers\CSharp\Analyzers\UseCollectionInitializer\CSharpUseCollectionInitializerAnalyzer.cs (1)
86else if (firstParameter is { Type.SpecialType: SpecialType.System_Int32, Name: "capacity" })
src\Analyzers\CSharp\Analyzers\UseCompoundAssignment\CSharpUseCompoundCoalesceAssignmentDiagnosticAnalyzer.cs (2)
185if (symbol is null || !symbol.IsUserDefinedOperator() || symbol.ContainingType.SpecialType == SpecialType.System_String) 203symbol.ContainingType?.SpecialType == SpecialType.System_Object)
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseIndexOperatorDiagnosticAnalyzer.cs (1)
83var arrayType = compilation.GetSpecialType(SpecialType.System_Array);
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseRangeOperatorDiagnosticAnalyzer.InfoCache.cs (1)
74var stringType = compilation.GetSpecialType(SpecialType.System_String);
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\Helpers.cs (5)
16=> method is { ContainingType.SpecialType: SpecialType.System_String, Name: nameof(string.Remove) }; 33p.Type.SpecialType == SpecialType.System_Int32) 80method.OriginalDefinition.Parameters[0].Type.SpecialType == SpecialType.System_Int32; 118=> parameter.Type.SpecialType == SpecialType.System_Int32 && 122=> parameter.Type.SpecialType == SpecialType.System_Int32 &&
src\Analyzers\CSharp\Analyzers\UseIsNullCheck\CSharpUseIsNullCheckForCastAndEqualityOperatorDiagnosticAnalyzer.cs (1)
76if (semanticModel.GetTypeInfo(castExpression.Type).Type?.SpecialType == SpecialType.System_Object)
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndNullCheckDiagnosticAnalyzer.cs (1)
88if (castType?.SpecialType == SpecialType.System_Object)
src\Analyzers\CSharp\Analyzers\UseSystemThreadingLock\CSharpUseSystemThreadingLockDiagnosticAnalyzer.cs (2)
92Type.SpecialType: SpecialType.System_Object, 246=> value.UnwrapImplicitConversion() is IObjectCreationOperation { Type.SpecialType: SpecialType.System_Object };
src\Analyzers\CSharp\Analyzers\UseUtf8StringLiteral\UseUtf8StringLiteralDiagnosticAnalyzer.cs (1)
77if (arrayCreationOperation.Type is not IArrayTypeSymbol { ElementType.SpecialType: SpecialType.System_Byte })
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ITypeSymbolExtensions.cs (13)
19case SpecialType.System_Boolean: 20case SpecialType.System_Char: 21case SpecialType.System_SByte: 22case SpecialType.System_Int16: 23case SpecialType.System_Int32: 24case SpecialType.System_Int64: 25case SpecialType.System_Byte: 26case SpecialType.System_UInt16: 27case SpecialType.System_UInt32: 28case SpecialType.System_UInt64: 29case SpecialType.System_Single: 30case SpecialType.System_Double: 33case SpecialType.System_Decimal:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (18)
96while (current is IConversionOperation { Type.SpecialType: SpecialType.System_Delegate or SpecialType.System_MulticastDelegate }) 99if (current is IConversionOperation { Type.SpecialType: SpecialType.System_Object }) 552if (castNode.IsParentKind(SyntaxKind.Interpolation) && originalConversionOperation.Type?.SpecialType is SpecialType.System_Object) 647if (originalNamedConvertedType.OriginalDefinition.SpecialType is SpecialType.System_Collections_Generic_IEnumerable_T && 648namedCastedType.OriginalDefinition.SpecialType is SpecialType.System_Collections_Generic_IReadOnlyCollection_T or SpecialType.System_Collections_Generic_IReadOnlyList_T) 654if (originalNamedConvertedType.OriginalDefinition.SpecialType is SpecialType.System_Collections_Generic_ICollection_T && 655namedCastedType.OriginalDefinition.SpecialType is SpecialType.System_Collections_Generic_IList_T) 661if (originalNamedConvertedType.OriginalDefinition.SpecialType is SpecialType.System_Collections_Generic_ICollection_T or SpecialType.System_Collections_Generic_IList_T && 726if (current.ContainingType.SpecialType == SpecialType.System_Object) 822=> type.IsSignedIntegralType() || type?.SpecialType is SpecialType.System_IntPtr; 958if (binaryOperation.LeftOperand.Type?.SpecialType == SpecialType.System_Object && 965else if (binaryOperation.RightOperand.Type?.SpecialType == SpecialType.System_Object && 1148=> type?.SpecialType is SpecialType.System_Double or SpecialType.System_Single; 1435rewrittenType.SpecialType == SpecialType.System_Enum;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (72)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (4)
29methodSymbol.ReturnType.SpecialType == SpecialType.System_Boolean && 37methodSymbol.Parameters.First().Type.SpecialType == SpecialType.System_Object && 517else if (parameter.Type.SpecialType == SpecialType.System_Object) 1108var objectType = compilation.GetSpecialType(SpecialType.System_Object);
src\Analyzers\CSharp\CodeFixes\FixIncorrectConstraint\CSharpFixIncorrectConstraintCodeFixProvider.cs (2)
89isEnumConstraint ? SpecialType.System_Enum : SpecialType.System_Delegate));
src\Analyzers\CSharp\CodeFixes\FixReturnType\CSharpFixReturnTypeCodeFixProvider.cs (1)
102if (previousReturnType.SpecialType is SpecialType.System_Void ||
src\Analyzers\CSharp\CodeFixes\GenerateParameterizedMember\CSharpGenerateDeconstructMethodService.cs (1)
53type: semanticModel.GetTypeInfo(((ConstantPatternSyntax)positionalPattern.Subpatterns[i].Pattern).Expression, cancellationToken).Type ?? semanticModel.Compilation.GetSpecialType(SpecialType.System_Object),
src\Analyzers\CSharp\CodeFixes\ReplaceDefaultLiteral\CSharpReplaceDefaultLiteralCodeFixProvider.cs (2)
96else if (type.SpecialType is SpecialType.System_IntPtr or SpecialType.System_UIntPtr)
src\Analyzers\CSharp\CodeFixes\UseUtf8StringLiteral\UseUtf8StringLiteralCodeFixProvider.cs (1)
67namedType.TypeArguments[0].SpecialType == SpecialType.System_Byte;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpFlagsEnumGenerator.cs (1)
23SpecialType underlyingSpecialType,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ExpressionGenerator.cs (6)
124var isNotSingle = !IsSpecialType(type, SpecialType.System_Single); 135if (value is double && !IsSpecialType(type, SpecialType.System_Double)) 140if (value is uint && !IsSpecialType(type, SpecialType.System_UInt32)) 145if (value is long && !IsSpecialType(type, SpecialType.System_Int64)) 150if (value is ulong && !IsSpecialType(type, SpecialType.System_UInt64)) 159var isNotDecimal = !IsSpecialType(type, SpecialType.System_Decimal);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\NamedTypeGenerator.cs (2)
247var baseList = namedType.EnumUnderlyingType != null && namedType.EnumUnderlyingType.SpecialType != SpecialType.System_Int32 318if (namedType.TypeKind == TypeKind.Class && namedType.BaseType != null && namedType.BaseType.SpecialType != Microsoft.CodeAnalysis.SpecialType.System_Object)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ExpressionSyntaxExtensions.cs (1)
116targetType = semanticModel.Compilation.GetSpecialType(SpecialType.System_Object);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\InternalExtensions.cs (1)
33if (typeInfo.Type != null && typeInfo.Type.SpecialType == SpecialType.System_Void)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeParameterSymbolExtensions.cs (1)
65if (type.SpecialType != SpecialType.System_Object)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (2)
122syntax = IdentifierName(symbol.SpecialType == SpecialType.System_IntPtr ? "nint" : "nuint"); 226if (symbol.SpecialType == SpecialType.System_Void)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpSyntaxGeneratorInternal.cs (12)
264case SpecialType.System_Boolean: 266case SpecialType.System_SByte: 267case SpecialType.System_Byte: 268case SpecialType.System_Int16: 269case SpecialType.System_UInt16: 270case SpecialType.System_Int32: 271case SpecialType.System_UInt32: 272case SpecialType.System_Int64: 273case SpecialType.System_UInt64: 274case SpecialType.System_Decimal: 275case SpecialType.System_Single: 276case SpecialType.System_Double:
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (35)
585return CreateResult(this.Compilation.GetSpecialType(SpecialType.System_Int32)); 844return CreateResult(this.Compilation.GetSpecialType(SpecialType.System_Int32)); 968return CreateResult(this.Compilation.GetSpecialType(SpecialType.System_Int32)); 978return CreateResult(SpecialType.System_Boolean); 1033if (parentTypes.Any(static parentType => parentType.InferredType.SpecialType == SpecialType.System_String || parentType.InferredType.TypeKind == TypeKind.Delegate)) 1035return parentTypes.Where(parentType => parentType.InferredType.SpecialType == SpecialType.System_String || parentType.InferredType.TypeKind == TypeKind.Delegate); 1066return CreateResult(this.Compilation.GetSpecialType(SpecialType.System_Int32)); 1073return CreateResult(SpecialType.System_Boolean); 1106return CreateResult(SpecialType.System_Boolean); 1129return CreateResult(SpecialType.System_Object, NullableAnnotation.Annotated); 1143else if (symbol.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T) 1150return compilation.GetSpecialType(SpecialType.System_Nullable_T).Construct(symbol); 1171return CreateResult(SpecialType.System_Boolean); 1205return CreateResult(SpecialType.System_Boolean); 1244return CreateResult(SpecialType.System_Void); 1257? this.Compilation.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T) 1260enumerableType ??= this.Compilation.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T); 1268.Construct(Compilation.GetSpecialType(SpecialType.System_Object))); 1283return CreateResult(SpecialType.System_Boolean); 1292return CreateResult(SpecialType.System_Boolean); 1601return CreateResult(SpecialType.System_Object); 1897return CreateResult(this.Compilation.GetSpecialType(SpecialType.System_Int32)); 1915return CreateResult(this.Compilation.GetSpecialType(SpecialType.System_Int32)); 1922return CreateResult(this.Compilation.GetSpecialType(SpecialType.System_Int32)); 1931return CreateResult(SpecialType.System_Boolean); 1978return types.Select(t => t.InferredType.SpecialType == SpecialType.System_Void ? new TypeInferenceInfo(task) : new TypeInferenceInfo(taskOfT.Construct(t.InferredType))); 2014return this.Compilation.GetSpecialType(SpecialType.System_Void); 2142return CreateResult(this.Compilation.GetSpecialType(SpecialType.System_Int32)); 2169return CreateResult(SpecialType.System_IDisposable); 2193return CreateResult(SpecialType.System_IDisposable); 2197return CreateResult(this.Compilation.GetSpecialType(SpecialType.System_Int32)); 2200if (laterUsageInference is not [] and not [{ InferredType.SpecialType: SpecialType.System_Object }]) 2229if (inferredDescendantTypes is not [] and not [{ InferredType.SpecialType: SpecialType.System_Object }]) 2374return [new TypeInferenceInfo(Compilation.GetSpecialType(SpecialType.System_Boolean))]; 2383return CreateResult(SpecialType.System_Boolean);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (2)
CodeGeneration\SyntaxGeneratorTests.cs (2)
91Assert.Equal(SpecialType.System_String, typeInfo.Type.SpecialType); 92Assert.Equal(SpecialType.System_String, typeInfo.ConvertedType.SpecialType);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (177)
CodeGen\CodeGenAsyncLocalsTests.cs (1)
968Assert.Equal(1, spillFieldsByType.Single(x => TypeSymbol.Equals(x.Key, comp.GetSpecialType(SpecialType.System_Int32), TypeCompareKind.ConsiderEverything2)).Count());
CodeGen\CodeGenAsyncTests.cs (2)
926Assert.Equal(SpecialType.System_Int64, hoistedField.Type.SpecialType); 985Assert.Equal(SpecialType.System_Int64, hoistedField.Type.SpecialType);
CodeGen\CodeGenAwaitUsingTests.cs (3)
671comp.MakeTypeMissing(SpecialType.System_IDisposable); 3076comp.MakeTypeMissing(SpecialType.System_IDisposable); 3099comp.MakeTypeMissing(SpecialType.System_IDisposable);
CodeGen\CodeGenDeconstructTests.cs (3)
7236Assert.Equal(SpecialType.System_Int32, symbolInfo.Symbol.GetTypeOrReturnType().SpecialType); 7511Assert.Equal(SpecialType.System_Int32, xSymbolInfo.Symbol.GetTypeOrReturnType().SpecialType); 7518Assert.Equal(SpecialType.System_Boolean, zSymbolInfo.Symbol.GetTypeOrReturnType().SpecialType);
CodeGen\CodeGenDynamicTests.cs (2)
594Assert.Equal(SpecialType.System_Object, container.BaseType().SpecialType); 830Assert.Equal(SpecialType.System_MulticastDelegate, d.BaseType().SpecialType);
CodeGen\CodeGenForEachTests.cs (1)
1395compilation.MakeTypeMissing(SpecialType.System_IDisposable);
CodeGen\CodeGenFunctionPointersTests.cs (27)
102(RefKind.None, IsSpecialType(SpecialType.System_Int32)), 103(RefKind.None, IsSpecialType(SpecialType.System_String))); 146(RefKind.Ref, IsArrayType(IsSpecialType(SpecialType.System_Int32))), 148(RefKind.Ref, IsSpecialType(SpecialType.System_String))); 170(RefKind.Ref, IsArrayType(IsSpecialType(SpecialType.System_Int32))), 172(RefKind.Out, IsSpecialType(SpecialType.System_String))); 200(RefKind.None, IsSpecialType(SpecialType.System_Int32))) 229(RefKind.RefReadOnly, IsSpecialType(SpecialType.System_Boolean)), 230(RefKind.In, IsSpecialType(SpecialType.System_String)), 231(RefKind.In, IsSpecialType(SpecialType.System_Int32))); 565(RefKind.RefReadOnly, IsSpecialType(SpecialType.System_Int32))); 569(RefKind.RefReadOnly, IsSpecialType(SpecialType.System_Int32))); 574(RefKind.Out, IsSpecialType(SpecialType.System_Int32))); 579(RefKind.In, IsSpecialType(SpecialType.System_Int32))); 584(RefKind.Out, IsSpecialType(SpecialType.System_Int32))); 589(RefKind.In, IsSpecialType(SpecialType.System_Int32))); 652(RefKind.RefReadOnly, IsSpecialType(SpecialType.System_String))))); 657(RefKind.None, IsSpecialType(SpecialType.System_Int32)))), 690(RefKind.RefReadOnly, IsSpecialType(SpecialType.System_Boolean)), 691(RefKind.In, IsSpecialType(SpecialType.System_Int32))); 746(RefKind.Ref, IsSpecialType(SpecialType.System_Boolean)), 747(RefKind.Ref, IsSpecialType(SpecialType.System_Int32))); 791(RefKind.None, IsSpecialType(SpecialType.System_String)))); 794(RefKind.None, IsSpecialType(SpecialType.System_Int32)))); 870Assert.Equal(SpecialType.System_Object, returnTypeWithAnnotations.CustomModifiers[0].Modifier.SpecialType); 7669var @string = comp1.GetSpecialType(SpecialType.System_String); 7754var @string = comp2.GetSpecialType(SpecialType.System_String);
CodeGen\CodeGenTupleTest.cs (99)
498t => Assert.Equal(SpecialType.System_Int32, t.SpecialType)); 512t => Assert.Equal(SpecialType.System_Int32, t.SpecialType)); 524t => Assert.Equal(SpecialType.System_Int32, t.SpecialType)); 536t => Assert.Equal(SpecialType.System_Int32, t.SpecialType)); 699t => Assert.Equal(SpecialType.System_Int32, t.SpecialType)); 715t => Assert.Equal(SpecialType.System_Int32, t.SpecialType)); 1015Assert.Equal(SpecialType.System_Int32, t.SpecialType)); 5789TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 5826TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 5827TypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 5853TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 5870TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 5871TypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 5905var intType = comp.GetSpecialType(SpecialType.System_Int32); 5906var stringType = comp.GetSpecialType(SpecialType.System_String); 5947TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 5948TypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 5968TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 5969TypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 5987TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 5988TypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 6006TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 6024TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 6025TypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 6050TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 6051TypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 6076TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 6077TypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 6101TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 6102TypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 6126TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 6127TypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 6152TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 6153TypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 6186TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 6210ITypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 6270NamedTypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 6292NamedTypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 6339TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 6364TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 6365TypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 6383var intType = comp.GetSpecialType(SpecialType.System_Int32); 6384var stringType = comp.GetSpecialType(SpecialType.System_String); 6412TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 6413TypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 6428TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 6429TypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 6444TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 6459TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 6460TypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 6479TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 6480TypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 6499TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 6500TypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 6520TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 6521TypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 6543TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 6560TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 6584INamedTypeSymbol intType = comp.GetSpecialType(SpecialType.System_String).GetPublicSymbol(); 6602var intType = comp.GetSpecialType(SpecialType.System_Int32); 6603var stringType = comp.GetSpecialType(SpecialType.System_String); 6934NamedTypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 18843TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 18844TypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 18861ITypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 18862ITypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 18881ITypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 18882ITypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 18904TypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 18905TypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 18906TypeSymbol objectType = comp.GetSpecialType(SpecialType.System_Object); 18921ITypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 18922ITypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 18923ITypeSymbol objectType = comp.GetSpecialType(SpecialType.System_Object); 18947ITypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 18948ITypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 18949ITypeSymbol objectType = comp.GetSpecialType(SpecialType.System_Object); 18972ITypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 18973ITypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 18974ITypeSymbol objectType = comp.GetSpecialType(SpecialType.System_Object); 18997ITypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 18998ITypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 18999ITypeSymbol objectType = comp.GetSpecialType(SpecialType.System_Object); 19023ITypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 19024ITypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 19025ITypeSymbol objectType = comp.GetSpecialType(SpecialType.System_Object); 19065ITypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 19066ITypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 19067ITypeSymbol objectType = comp.GetSpecialType(SpecialType.System_Object); 19104ITypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 19105ITypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 19106ITypeSymbol objectType = comp.GetSpecialType(SpecialType.System_Object); 19143ITypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 19144ITypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 19145ITypeSymbol objectType = comp.GetSpecialType(SpecialType.System_Object); 19182ITypeSymbol intType = comp.GetSpecialType(SpecialType.System_Int32); 19183ITypeSymbol stringType = comp.GetSpecialType(SpecialType.System_String); 19184ITypeSymbol objectType = comp.GetSpecialType(SpecialType.System_Object); 28988var @object = comp.GetSpecialType(SpecialType.System_Object);
CodeGen\DestructorTests.cs (2)
601Assert.Equal(SpecialType.System_Int32, intType.SpecialType); 834Assert.Equal(SpecialType.System_Void, destructor.ReturnType.SpecialType);
CodeGen\IndexAndRangeTests.cs (1)
1002Assert.Equal(SpecialType.System_Int32, property.Parameters[0].Type.SpecialType);
Emit\CompilationEmitTests.cs (1)
5050comp.GetSpecialType(SpecialType.System_Int32);
Emit\EmitMetadataTests.cs (35)
450Assert.Same(module.GetCorLibType(SpecialType.System_Array), parameter1Type); 451Assert.Same(module.GetCorLibType(SpecialType.System_Boolean), m2.Parameters.Single().Type); 452Assert.Same(module.GetCorLibType(SpecialType.System_Char), m3.Parameters.Single().Type); 456Assert.Same(module.GetCorLibType(SpecialType.System_Void), m4.ReturnType); 457Assert.Same(module.GetCorLibType(SpecialType.System_SByte), method4ParamTypes[0]); 458Assert.Same(module.GetCorLibType(SpecialType.System_Single), method4ParamTypes[1]); 459Assert.Same(module.GetCorLibType(SpecialType.System_Double), method4ParamTypes[2]); 460Assert.Same(module.GetCorLibType(SpecialType.System_Int16), method4ParamTypes[3]); 461Assert.Same(module.GetCorLibType(SpecialType.System_Int32), method4ParamTypes[4]); 462Assert.Same(module.GetCorLibType(SpecialType.System_Int64), method4ParamTypes[5]); 463Assert.Same(module.GetCorLibType(SpecialType.System_IntPtr), method4ParamTypes[6]); 464Assert.Same(module.GetCorLibType(SpecialType.System_String), method4ParamTypes[7]); 465Assert.Same(module.GetCorLibType(SpecialType.System_Byte), method4ParamTypes[8]); 466Assert.Same(module.GetCorLibType(SpecialType.System_UInt16), method4ParamTypes[9]); 467Assert.Same(module.GetCorLibType(SpecialType.System_UInt32), method4ParamTypes[10]); 468Assert.Same(module.GetCorLibType(SpecialType.System_UInt64), method4ParamTypes[11]); 469Assert.Same(module.GetCorLibType(SpecialType.System_UIntPtr), method4ParamTypes[12]); 667CheckConstantField(type, "I", Accessibility.Private, SpecialType.System_Int32, -1); 669CheckConstantField(type, "J", Accessibility.Internal, SpecialType.System_Int32, -1); 670CheckConstantField(type, "O", Accessibility.ProtectedOrInternal, SpecialType.System_Object, null); 671CheckConstantField(type, "S", Accessibility.Public, SpecialType.System_String, "string"); 677private void CheckConstantField(NamedTypeSymbol type, string name, Accessibility declaredAccessibility, SpecialType fieldType, object value) 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); 1332CheckEnumType(type, Accessibility.Internal, SpecialType.System_Int32); 1356CheckEnumType(type, Accessibility.Internal, SpecialType.System_Int16); 1390private void CheckEnumType(NamedTypeSymbol type, Accessibility declaredAccessibility, SpecialType underlyingType) 1392Assert.Equal(SpecialType.System_Enum, type.BaseType().SpecialType);
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (15)
Emit\EditAndContinue\EditAndContinueTests.cs (8)
18477Edit(SemanticEditKind.Delete, symbolProvider: c => c.GetMembers("C.M").FirstOrDefault(m => m.GetParameterTypes()[0].SpecialType == SpecialType.System_Int32)?.ISymbol, newSymbolProvider: c=>c.GetMember("C")), 18478Edit(SemanticEditKind.Insert, symbolProvider: c => c.GetMembers("C.M").FirstOrDefault(m => m.GetParameterTypes()[0].SpecialType == SpecialType.System_Boolean)?.ISymbol), 18555Edit(SemanticEditKind.Delete, symbolProvider: c => c.GetMembers("C.M").FirstOrDefault(m => m.GetParameterTypes()[0].SpecialType == SpecialType.System_Boolean)?.ISymbol, newSymbolProvider: c=>c.GetMember("C")), 18556Edit(SemanticEditKind.Insert, symbolProvider: c => c.GetMembers("C.M").FirstOrDefault(m => m.GetParameterTypes()[0].SpecialType == SpecialType.System_Int32)?.ISymbol), 18628Edit(SemanticEditKind.Delete, symbolProvider: c => c.GetMembers("C.M").FirstOrDefault(m => m.GetTypeOrReturnType().SpecialType == SpecialType.System_String)?.ISymbol, newSymbolProvider: c=>c.GetMember("C")), 18629Edit(SemanticEditKind.Insert, symbolProvider: c => c.GetMembers("C.M").FirstOrDefault(m => m.GetTypeOrReturnType().SpecialType == SpecialType.System_Int32)?.ISymbol), 18710Edit(SemanticEditKind.Delete, symbolProvider: c => c.GetMembers("C.M").FirstOrDefault(m => m.GetTypeOrReturnType().SpecialType == SpecialType.System_Int32)?.ISymbol, newSymbolProvider: c=>c.GetMember("C")), 18711Edit(SemanticEditKind.Insert, symbolProvider: c => c.GetMembers("C.M").FirstOrDefault(m => m.GetTypeOrReturnType().SpecialType == SpecialType.System_String)?.ISymbol),
Emit\NumericIntPtrTests.cs (6)
1606return type.SpecialType == (signed ? SpecialType.System_IntPtr : SpecialType.System_UIntPtr); 10362Assert.Same(nintType, comp.GetSpecialType(SpecialType.System_IntPtr)); 10375Assert.Same(nuintType, comp.GetSpecialType(SpecialType.System_UIntPtr)); 10385Assert.Equal(SpecialType.System_IntPtr, type.SpecialType); 10394Assert.Equal(SpecialType.System_UIntPtr, type.SpecialType);
PDB\PDBTests.cs (1)
709var stInt = c1.GetSpecialType(SpecialType.System_Int32);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (101)
Attributes\AttributeTests.cs (1)
5517NamedTypeSymbol classYOfInt = classY.ConstructIfGeneric(ImmutableArray.Create(TypeWithAnnotations.Create(m.ContainingAssembly.GetSpecialType(SpecialType.System_Int32))));
Attributes\AttributeTests_Synthesized.cs (2)
648var c1OfInt = comp.GetTypeByMetadataName("C1`1").Construct(comp.GetSpecialType(SpecialType.System_Int32)); 1970new TypedConstant(comp.GetSpecialType(SpecialType.System_String), TypedConstantKind.Primitive, "unused"))));
Attributes\AttributeTests_Tuples.cs (2)
354Assert.Equal(SpecialType.System_Object, sender.Type.SpecialType); 647Assert.True(constant.Type.SpecialType == SpecialType.System_String);
PartialEventsAndConstructorsTests.cs (2)
2087var intSymbol = comp.GetSpecialType(SpecialType.System_Int32); 2118var intSymbol = comp.GetSpecialType(SpecialType.System_Int32);
Semantics\CollectionExpressionTests.cs (32)
4990var collectionType = comp.GetWellKnownType(WellKnownType.System_Collections_Generic_List_T).Construct(comp.GetSpecialType(SpecialType.System_Int32)); 5045var collectionType = comp.GetWellKnownType(WellKnownType.System_Collections_Generic_List_T).Construct(comp.GetSpecialType(SpecialType.System_Int32)); 5099var listType = comp.GetWellKnownType(WellKnownType.System_Collections_Generic_List_T).Construct(comp.GetSpecialType(SpecialType.System_Int32)); 9180comp.MakeTypeMissing(SpecialType.System_Collections_IEnumerable); 13370[InlineData(SpecialType.System_Collections_IEnumerable, "System.Collections.IEnumerable")] 13371[InlineData(SpecialType.System_Collections_Generic_IEnumerable_T, "System.Collections.Generic.IEnumerable`1")] 13372[InlineData(SpecialType.System_Collections_Generic_IReadOnlyCollection_T, "System.Collections.Generic.IReadOnlyCollection`1", true)] 13373[InlineData(SpecialType.System_Collections_Generic_IReadOnlyList_T, "System.Collections.Generic.IReadOnlyList`1", true)] 13374[InlineData(SpecialType.System_Collections_Generic_ICollection_T, "System.Collections.Generic.ICollection`1")] 13375[InlineData(SpecialType.System_Collections_Generic_IList_T, "System.Collections.Generic.IList`1")] 13376public void SynthesizedReadOnlyList_MissingSpecialTypes(SpecialType missingType, string missingTypeName, bool isOptional = false) 13404[InlineData(new SpecialType[0])] 13405[InlineData(new[] { SpecialType.System_Collections_Generic_IReadOnlyCollection_T })] 13406[InlineData(new[] { SpecialType.System_Collections_Generic_IReadOnlyList_T })] 13407[InlineData(new[] { SpecialType.System_Collections_Generic_IReadOnlyCollection_T, 13408SpecialType.System_Collections_Generic_IReadOnlyList_T })] 13409public void SynthesizedReadOnlyList_MissingOptionalSpecialTypes_01(SpecialType[] missingTypes) 13425foreach (var missingType in missingTypes) 19725comp.MakeTypeMissing(SpecialType.System_Int32); 30143var collectionType = comp.GetWellKnownType(WellKnownType.System_Collections_Immutable_ImmutableArray_T).Construct(comp.GetSpecialType(SpecialType.System_Int32)); 30203var collectionType = comp.GetWellKnownType(WellKnownType.System_Collections_Immutable_ImmutableArray_T).Construct(comp.GetSpecialType(SpecialType.System_Int32)); 30414var collectionType = comp.GetWellKnownType(WellKnownType.System_Collections_Immutable_ImmutableArray_T).Construct(comp.GetSpecialType(SpecialType.System_Int32)); 30438collectionType = comp.GetWellKnownType(WellKnownType.System_Collections_Immutable_ImmutableArray_T).Construct(comp.GetSpecialType(SpecialType.System_Int32)); 30473var collectionType = comp.GetWellKnownType(WellKnownType.System_Collections_Immutable_ImmutableArray_T).Construct(comp.GetSpecialType(SpecialType.System_Int32)); 30495collectionType = comp.GetWellKnownType(WellKnownType.System_Collections_Immutable_ImmutableArray_T).Construct(comp.GetSpecialType(SpecialType.System_Int32)); 30527var collectionType = comp.GetWellKnownType(WellKnownType.System_Collections_Immutable_ImmutableArray_T).Construct(comp.GetSpecialType(SpecialType.System_Int32)); 30549collectionType = comp.GetWellKnownType(WellKnownType.System_Collections_Immutable_ImmutableArray_T).Construct(comp.GetSpecialType(SpecialType.System_Int32)); 37105comp.MakeTypeMissing(SpecialType.System_Collections_Generic_ICollection_T); 42520[InlineData((int)SpecialType.System_IDisposable)] 42521[InlineData((int)SpecialType.System_Collections_IEnumerator)] 42522[InlineData((int)SpecialType.System_Collections_Generic_IEnumerator_T)] 42532comp.MakeTypeMissing((SpecialType)missingType);
Semantics\ExtensionTests.cs (15)
65Assert.Equal(SpecialType.None, symbol.SpecialType); 88Assert.Equal(SpecialType.None, symbol.SpecialType); 258var constructed = symbol.Construct(comp.GetSpecialType(SpecialType.System_Int32)); 477var substitutedExtension = (INamedTypeSymbol)container.Construct(comp.GetSpecialType(SpecialType.System_Int32)).GetMembers().Single(); 3780var o = ((Compilation)comp).GetSpecialType(SpecialType.System_Object); 32897var o = ((Compilation)comp).GetSpecialType(SpecialType.System_Object); 32944var o = ((Compilation)comp).GetSpecialType(SpecialType.System_Object); 32977var o = ((Compilation)comp).GetSpecialType(SpecialType.System_Object); 32987var s = ((Compilation)comp).GetSpecialType(SpecialType.System_String); 33016var s = ((Compilation)comp).GetSpecialType(SpecialType.System_String); 33048var o = ((Compilation)comp).GetSpecialType(SpecialType.System_Object); 33089var o = ((Compilation)comp).GetSpecialType(SpecialType.System_Object); 33120var o = ((Compilation)comp).GetSpecialType(SpecialType.System_Object); 33151var o = ((Compilation)comp).GetSpecialType(SpecialType.System_Object); 34006var o = ((Compilation)comp).GetSpecialType(SpecialType.System_Object);
Semantics\InlineArrayTests.cs (17)
114var t = comp.GetSpecialType(SpecialType.System_Runtime_CompilerServices_InlineArrayAttribute); 115Assert.Equal(SpecialType.System_Runtime_CompilerServices_InlineArrayAttribute, t.SpecialType); 116Assert.Equal(t.IsValueType, SpecialType.System_Runtime_CompilerServices_InlineArrayAttribute.IsValueType()); 167Assert.Equal(SpecialType.System_Int32, buffer.TryGetInlineArrayElementField().Type.SpecialType); 192var bufferOfInt = buffer.Construct(m.ContainingAssembly.GetSpecialType(SpecialType.System_Int32)); 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\ParamsCollectionTests.cs (4)
5894Assert.NotEqual(SpecialType.System_String, model.GetSymbolInfo(f1).Symbol.GetParameters().Single().Type.SpecialType); 5896Assert.NotEqual(SpecialType.System_String, model.GetSymbolInfo(f2).Symbol.GetParameters().Single().Type.SpecialType); 5976Assert.NotEqual(SpecialType.System_String, model.GetSymbolInfo(f1).Symbol.GetParameters().Single().Type.SpecialType); 5978Assert.NotEqual(SpecialType.System_String, model.GetSymbolInfo(f2).Symbol.GetParameters().Single().Type.SpecialType);
Semantics\PatternMatchingTests.cs (2)
11370Assert.Equal(SpecialType.System_String, typeInfo.Type.SpecialType); 11371Assert.Equal(SpecialType.System_String, typeInfo.ConvertedType.SpecialType);
Semantics\PatternMatchingTests2.cs (3)
2028Assert.Equal(SpecialType.System_Boolean, typeInfo.Type.SpecialType); 2069Assert.Equal(SpecialType.System_Boolean, typeInfo.Type.SpecialType); 3271comp.MakeTypeMissing(SpecialType.System_Int32);
Semantics\PatternSwitchTests.cs (2)
3288Assert.Equal(SpecialType.System_Boolean, type.Type.SpecialType); 3289Assert.Equal(SpecialType.System_Boolean, type.ConvertedType.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 (6)
120Assert.Equal(SpecialType.System_Object, point.BaseTypeNoUseSiteDiagnostics.SpecialType); 12537verifyReturnType(property.GetMethod, CSharpCustomModifier.CreateOptional(comp.GetSpecialType(SpecialType.System_Int32))); 12542CSharpCustomModifier.CreateOptional(comp.GetSpecialType(SpecialType.System_UInt16))); 12545CSharpCustomModifier.CreateOptional(comp.GetSpecialType(SpecialType.System_Byte))); 12547CSharpCustomModifier.CreateOptional(comp.GetSpecialType(SpecialType.System_UInt16))); 18613comp.MakeTypeMissing(SpecialType.System_Boolean);
Microsoft.CodeAnalysis.CSharp.EndToEnd.UnitTests (1)
EndToEndTests.cs (1)
619Assert.Equal(SpecialType.System_String, type.SpecialType);
Microsoft.CodeAnalysis.CSharp.Features (116)
CodeRefactorings\UseRecursivePatterns\UseRecursivePatternsCodeRefactoringProvider.cs (1)
525ContainingType: not { SpecialType: SpecialType.System_Nullable_T }
Completion\CompletionProviders\CSharpSuggestionModeCompletionProvider.cs (1)
199.FirstOrDefault(i => i.OriginalDefinition.SpecialType == SpecialType.System_Collections_Generic_IEnumerable_T);
Completion\CompletionProviders\DeclarationName\DeclarationNameRecommender.cs (3)
93if (type.SpecialType == SpecialType.System_Void) 142t => t.OriginalDefinition.SpecialType == SpecialType.System_Collections_Generic_IEnumerable_T || 166originalDefinition.SpecialType == SpecialType.System_Nullable_T)
Completion\CompletionProviders\EnumAndCompletionListTagCompletionProvider.cs (1)
114if (type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T)
Completion\CompletionProviders\ObjectCreationCompletionProvider.cs (1)
130if (namedTypeSymbol?.SpecialType == SpecialType.System_Object)
Completion\KeywordRecommenders\AbstractSpecialTypePreselectingKeywordRecommender.cs (1)
20protected abstract SpecialType SpecialType { get; }
Completion\KeywordRecommenders\BoolKeywordRecommender.cs (2)
49protected override SpecialType SpecialType => SpecialType.System_Boolean;
Completion\KeywordRecommenders\ByteKeywordRecommender.cs (2)
50protected override SpecialType SpecialType => SpecialType.System_Byte;
Completion\KeywordRecommenders\CharKeywordRecommender.cs (2)
49protected override SpecialType SpecialType => SpecialType.System_Char;
Completion\KeywordRecommenders\DecimalKeywordRecommender.cs (2)
49protected override SpecialType SpecialType => SpecialType.System_Decimal;
Completion\KeywordRecommenders\DoubleKeywordRecommender.cs (2)
49protected override SpecialType SpecialType => SpecialType.System_Double;
Completion\KeywordRecommenders\FloatKeywordRecommender.cs (2)
49protected override SpecialType SpecialType => SpecialType.System_Single;
Completion\KeywordRecommenders\IntKeywordRecommender.cs (2)
50protected override SpecialType SpecialType => SpecialType.System_Int32;
Completion\KeywordRecommenders\LongKeywordRecommender.cs (2)
50protected override SpecialType SpecialType => SpecialType.System_Int64;
Completion\KeywordRecommenders\ObjectKeywordRecommender.cs (2)
48protected override SpecialType SpecialType => SpecialType.System_Object;
Completion\KeywordRecommenders\SByteKeywordRecommender.cs (2)
50protected override SpecialType SpecialType => SpecialType.System_SByte;
Completion\KeywordRecommenders\ShortKeywordRecommender.cs (2)
50protected override SpecialType SpecialType => SpecialType.System_Int16;
Completion\KeywordRecommenders\StringKeywordRecommender.cs (2)
16protected override SpecialType SpecialType => SpecialType.System_String;
Completion\KeywordRecommenders\UIntKeywordRecommender.cs (2)
50protected override SpecialType SpecialType => SpecialType.System_UInt32;
Completion\KeywordRecommenders\ULongKeywordRecommender.cs (2)
50protected override SpecialType SpecialType => SpecialType.System_UInt64;
Completion\KeywordRecommenders\UShortKeywordRecommender.cs (2)
57protected override SpecialType SpecialType => SpecialType.System_UInt16;
Completion\Providers\DefaultArgumentProvider.cs (13)
39SpecialType.System_Boolean => "false", 40SpecialType.System_Char => @"'\\0'", 41SpecialType.System_Byte => "(byte)0", 42SpecialType.System_SByte => "(sbyte)0", 43SpecialType.System_Int16 => "(short)0", 44SpecialType.System_UInt16 => "(ushort)0", 45SpecialType.System_Int32 => "0", 46SpecialType.System_UInt32 => "0U", 47SpecialType.System_Int64 => "0L", 48SpecialType.System_UInt64 => "0UL", 49SpecialType.System_Decimal => "0.0m", 50SpecialType.System_Single => "0.0f", 51SpecialType.System_Double => "0.0",
ConvertForEachToFor\CSharpConvertForEachToForCodeRefactoringProvider.cs (2)
70model.Compilation.GetSpecialType(SpecialType.System_Object); 90model.Compilation.GetSpecialType(SpecialType.System_Int32).GenerateTypeSyntax(),
ConvertLinq\CSharpConvertLinqQueryToForEachProvider.cs (5)
303methodSymbol.ReturnType?.SpecialType == SpecialType.System_Int32 && 368=> typeSymbol.SpecialType == SpecialType.System_Int32; 554if (returnTypeInfo.Type.OriginalDefinition?.SpecialType == SpecialType.System_Collections_Generic_IEnumerable_T) 560if (returnTypeInfo.ConvertedType.OriginalDefinition?.SpecialType == SpecialType.System_Collections_Generic_IEnumerable_T) 746if (methodSymbol.ReturnType.OriginalDefinition?.SpecialType != SpecialType.System_Collections_Generic_IEnumerable_T)
ExtractMethod\CSharpMethodExtractor.Analyzer.cs (1)
32return info.Type == null || info.Type.SpecialType == SpecialType.System_Object
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.cs (6)
179if (controlFlowValueType.SpecialType == SpecialType.System_Boolean) 215else if (controlFlowValueType.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T) 255Contract.ThrowIfFalse(controlFlowValueType.SpecialType == SpecialType.System_Int32); 293return ReturnStatement(ReturnKeyword.WithoutTrailingTrivia(), this.AnalyzerResult.CoreReturnType.SpecialType == SpecialType.System_Void ? null : IdentifierName(ReturnValueName).WithLeadingTrivia(Space).WithoutTrailingTrivia(), SemicolonToken.WithoutLeadingTrivia()); 508if (this.AnalyzerResult.CoreReturnType.SpecialType == SpecialType.System_Void) 893var hasNonControlFlowReturnValue = variableInfos.Length > 0 || this.AnalyzerResult.CoreReturnType.SpecialType != SpecialType.System_Void;
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.ExpressionCodeGenerator.cs (1)
99return AnalyzerResult.CoreReturnType.SpecialType != SpecialType.System_Void
ExtractMethod\CSharpSelectionResult.ExpressionResult.cs (1)
122if (info.Type?.SpecialType == SpecialType.System_String &&
ExtractMethod\Extensions.cs (1)
258=> type == null || type.SpecialType == SpecialType.System_Object;
IntroduceVariable\CSharpIntroduceLocalForExpressionCodeRefactoringProvider.cs (1)
142var isIntrinsic = tupleType.TupleElements.All(f => f.Type?.SpecialType != SpecialType.None);
ReverseForStatement\CSharpReverseForStatementCodeRefactoringProvider.cs (4)
96SpecialType.System_Byte => IsUnsignedBoundary(startValue, endValue, byte.MaxValue), 97SpecialType.System_UInt16 => IsUnsignedBoundary(startValue, endValue, ushort.MaxValue), 98SpecialType.System_UInt32 => IsUnsignedBoundary(startValue, endValue, uint.MaxValue), 99SpecialType.System_UInt64 => IsUnsignedBoundary(startValue, endValue, ulong.MaxValue),
SignatureHelp\ElementAccessExpressionSignatureHelpProvider.cs (1)
63if (namedType.ConstructedFrom.SpecialType == SpecialType.System_Nullable_T &&
Snippets\AbstractCSharpAutoPropertySnippetProvider.cs (1)
69type: compilation.GetSpecialType(SpecialType.System_Int32).GenerateTypeSyntax(allowVar: false),
Snippets\AbstractCSharpForLoopSnippetProvider.cs (1)
75return (compilation.GetSpecialType(SpecialType.System_Int32).GenerateTypeSyntax(), inlineExpression);
Snippets\CSharpConsoleSnippetProvider.cs (1)
42if (lambdaSymbol is IMethodSymbol { ReturnType: { SpecialType: SpecialType.System_Void } or { TypeKind: TypeKind.Error } })
Snippets\CSharpIntMainSnippetProvider.cs (1)
31=> (TypeSyntax)generator.TypeExpression(SpecialType.System_Int32);
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertProgramAnalysis_TopLevelStatements.cs (1)
94if (containingType.BaseType?.SpecialType != SpecialType.System_Object)
src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (2)
392if (methodReference.ContainingType.SpecialType is SpecialType.System_Object or SpecialType.System_ValueType)
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryLambdaExpression\CSharpRemoveUnnecessaryLambdaExpressionDiagnosticAnalyzer.cs (1)
123if (lambdaTypeInfo.ConvertedType == null || lambdaTypeInfo.ConvertedType.SpecialType is SpecialType.System_Object)
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForArrayDiagnosticAnalyzer.cs (2)
101var ienumerableType = convertedType.OriginalDefinition.SpecialType is SpecialType.System_Collections_Generic_IEnumerable_T 104i => i.OriginalDefinition.SpecialType == SpecialType.System_Collections_Generic_IEnumerable_T);
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (6)
305is SpecialType.System_Collections_Generic_IEnumerable_T 306or SpecialType.System_Collections_Generic_IReadOnlyCollection_T 307or SpecialType.System_Collections_Generic_IReadOnlyList_T; 313is SpecialType.System_Collections_Generic_ICollection_T 314or SpecialType.System_Collections_Generic_IList_T; 354var capacityConstructor = GetAccessibleInstanceConstructor(constructors, c => c.Parameters is [{ Name: "capacity", Type.SpecialType: SpecialType.System_Int32 }]);
src\Analyzers\CSharp\Analyzers\UseCollectionInitializer\CSharpUseCollectionInitializerAnalyzer.cs (1)
86else if (firstParameter is { Type.SpecialType: SpecialType.System_Int32, Name: "capacity" })
src\Analyzers\CSharp\Analyzers\UseCompoundAssignment\CSharpUseCompoundCoalesceAssignmentDiagnosticAnalyzer.cs (2)
185if (symbol is null || !symbol.IsUserDefinedOperator() || symbol.ContainingType.SpecialType == SpecialType.System_String) 203symbol.ContainingType?.SpecialType == SpecialType.System_Object)
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseIndexOperatorDiagnosticAnalyzer.cs (1)
83var arrayType = compilation.GetSpecialType(SpecialType.System_Array);
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseRangeOperatorDiagnosticAnalyzer.InfoCache.cs (1)
74var stringType = compilation.GetSpecialType(SpecialType.System_String);
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\Helpers.cs (5)
16=> method is { ContainingType.SpecialType: SpecialType.System_String, Name: nameof(string.Remove) }; 33p.Type.SpecialType == SpecialType.System_Int32) 80method.OriginalDefinition.Parameters[0].Type.SpecialType == SpecialType.System_Int32; 118=> parameter.Type.SpecialType == SpecialType.System_Int32 && 122=> parameter.Type.SpecialType == SpecialType.System_Int32 &&
src\Analyzers\CSharp\Analyzers\UseIsNullCheck\CSharpUseIsNullCheckForCastAndEqualityOperatorDiagnosticAnalyzer.cs (1)
76if (semanticModel.GetTypeInfo(castExpression.Type).Type?.SpecialType == SpecialType.System_Object)
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndNullCheckDiagnosticAnalyzer.cs (1)
88if (castType?.SpecialType == SpecialType.System_Object)
src\Analyzers\CSharp\Analyzers\UseSystemThreadingLock\CSharpUseSystemThreadingLockDiagnosticAnalyzer.cs (2)
92Type.SpecialType: SpecialType.System_Object, 246=> value.UnwrapImplicitConversion() is IObjectCreationOperation { Type.SpecialType: SpecialType.System_Object };
src\Analyzers\CSharp\Analyzers\UseUtf8StringLiteral\UseUtf8StringLiteralDiagnosticAnalyzer.cs (1)
77if (arrayCreationOperation.Type is not IArrayTypeSymbol { ElementType.SpecialType: SpecialType.System_Byte })
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (4)
29methodSymbol.ReturnType.SpecialType == SpecialType.System_Boolean && 37methodSymbol.Parameters.First().Type.SpecialType == SpecialType.System_Object && 517else if (parameter.Type.SpecialType == SpecialType.System_Object) 1108var objectType = compilation.GetSpecialType(SpecialType.System_Object);
src\Analyzers\CSharp\CodeFixes\FixIncorrectConstraint\CSharpFixIncorrectConstraintCodeFixProvider.cs (2)
89isEnumConstraint ? SpecialType.System_Enum : SpecialType.System_Delegate));
src\Analyzers\CSharp\CodeFixes\FixReturnType\CSharpFixReturnTypeCodeFixProvider.cs (1)
102if (previousReturnType.SpecialType is SpecialType.System_Void ||
src\Analyzers\CSharp\CodeFixes\GenerateParameterizedMember\CSharpGenerateDeconstructMethodService.cs (1)
53type: semanticModel.GetTypeInfo(((ConstantPatternSyntax)positionalPattern.Subpatterns[i].Pattern).Expression, cancellationToken).Type ?? semanticModel.Compilation.GetSpecialType(SpecialType.System_Object),
src\Analyzers\CSharp\CodeFixes\ReplaceDefaultLiteral\CSharpReplaceDefaultLiteralCodeFixProvider.cs (2)
96else if (type.SpecialType is SpecialType.System_IntPtr or SpecialType.System_UIntPtr)
src\Analyzers\CSharp\CodeFixes\UseUtf8StringLiteral\UseUtf8StringLiteralCodeFixProvider.cs (1)
67namedType.TypeArguments[0].SpecialType == SpecialType.System_Byte;
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (29)
EditAndContinue\LineEditTests.cs (1)
774SemanticEdit(SemanticEditKind.Update, c => c.GetMember<INamedTypeSymbol>("C").Constructors.Single(c => c.Parameters is [{ Type.SpecialType: SpecialType.System_Boolean }]), preserveLocalVariables: true)
EditAndContinue\TopLevelEditingTests.cs (28)
6031SemanticEdit(SemanticEditKind.Delete, c => c.GetMembers("S.C.F2").FirstOrDefault(m => m.GetParameterTypes().Any(t => t.SpecialType == SpecialType.System_Byte))?.ISymbol, deletedSymbolContainerProvider: c => c.GetMember("S.C")) 6035semanticEdits: [SemanticEdit(SemanticEditKind.Insert, c => c.GetMembers("S.C.F2").FirstOrDefault(m => m.GetParameterTypes().Any(t => t.SpecialType == SpecialType.System_Int32))?.ISymbol)]) 7229semanticEdits: [SemanticEdit(SemanticEditKind.Update, c => c.GetMembers<IMethodSymbol>("C.F").Single(m => m.Parameters is [{ Type.SpecialType: SpecialType.System_Char }]))]), 7232semanticEdits: [SemanticEdit(SemanticEditKind.Update, c => c.GetMembers<IMethodSymbol>("C.F").Single(m => m.Parameters is [{ Type.SpecialType: SpecialType.System_Byte }]))]), 7249SemanticEdit(SemanticEditKind.Update, c => c.GetMembers<IPropertySymbol>("C.this[]").Single(m => m.Parameters is [{ Type.SpecialType: SpecialType.System_Char }])), 7250SemanticEdit(SemanticEditKind.Update, c => c.GetMembers<IPropertySymbol>("C.this[]").Single(m => m.Parameters is [{ Type.SpecialType: SpecialType.System_Char }]).GetMethod), 7251SemanticEdit(SemanticEditKind.Update, c => c.GetMembers<IPropertySymbol>("C.this[]").Single(m => m.Parameters is [{ Type.SpecialType: SpecialType.System_Char }]).SetMethod), 7257SemanticEdit(SemanticEditKind.Update, c => c.GetMembers<IPropertySymbol>("C.this[]").Single(m => m.Parameters is [{ Type.SpecialType: SpecialType.System_Byte }])), 7258SemanticEdit(SemanticEditKind.Update, c => c.GetMembers<IPropertySymbol>("C.this[]").Single(m => m.Parameters is [{ Type.SpecialType: SpecialType.System_Byte }]).GetMethod), 7259SemanticEdit(SemanticEditKind.Update, c => c.GetMembers<IPropertySymbol>("C.this[]").Single(m => m.Parameters is [{ Type.SpecialType: SpecialType.System_Byte }]).SetMethod), 7452SemanticEdit(SemanticEditKind.Insert, c => c.GetMembers("S.F").FirstOrDefault(m => m.GetParameterTypes().Any(t => t.SpecialType == SpecialType.System_Byte))?.ISymbol) 7458SemanticEdit(SemanticEditKind.Delete, c => c.GetMembers("S.F").FirstOrDefault(m => m.GetParameterTypes().Any(t => t.SpecialType == SpecialType.System_Int32))?.ISymbol, deletedSymbolContainerProvider: c => c.GetMember("S")) 8738SemanticEdit(SemanticEditKind.Delete, c => c.GetMembers("C.Main").FirstOrDefault(m => m.GetParameterTypes().Any(t => t.SpecialType == SpecialType.System_Boolean))?.ISymbol, deletedSymbolContainerProvider: c => c.GetMember("C")), 8739SemanticEdit(SemanticEditKind.Insert, c => c.GetMembers("C.Main").FirstOrDefault(m => m.GetParameterTypes().Any(t => t.SpecialType == SpecialType.System_Int32))?.ISymbol) 8774SemanticEdit(SemanticEditKind.Delete, c => c.GetMembers("C.Main").FirstOrDefault(m => m.GetParameterTypes().Any(t => t.SpecialType == SpecialType.System_Boolean))?.ISymbol, deletedSymbolContainerProvider: c => c.GetMember("C")), 8775SemanticEdit(SemanticEditKind.Insert, c => c.GetMembers("C.Main").FirstOrDefault(m => m.GetParameterTypes().Any(t => t.SpecialType == SpecialType.System_Int32))?.ISymbol) 21107SemanticEdit(SemanticEditKind.Update, c => c.GetMembers<IPropertySymbol>("S.this[]").Single(m => m.Parameters is [{ Type.SpecialType: SpecialType.System_Int32 }])), 21108SemanticEdit(SemanticEditKind.Update, c => c.GetMembers<IPropertySymbol>("S.this[]").Single(m => m.Parameters is [{ Type.SpecialType: SpecialType.System_SByte }])), 21109SemanticEdit(SemanticEditKind.Update, c => c.GetMembers<IPropertySymbol>("S.this[]").Single(m => m.Parameters is [{ Type.SpecialType: SpecialType.System_Int32 }]).GetMethod), 21110SemanticEdit(SemanticEditKind.Update, c => c.GetMembers<IPropertySymbol>("S.this[]").Single(m => m.Parameters is [{ Type.SpecialType: SpecialType.System_SByte }]).GetMethod), 21111SemanticEdit(SemanticEditKind.Update, c => c.GetMembers<IPropertySymbol>("S.this[]").Single(m => m.Parameters is [{ Type.SpecialType: SpecialType.System_SByte }]).SetMethod), 21112SemanticEdit(SemanticEditKind.Update, c => c.GetMembers<IPropertySymbol>("S.this[]").Single(m => m.Parameters is [{ Type.SpecialType: SpecialType.System_UInt32 }]).GetMethod), 21113SemanticEdit(SemanticEditKind.Update, c => c.GetMembers<IPropertySymbol>("S.this[]").Single(m => m.Parameters is [{ Type.SpecialType: SpecialType.System_Byte }]).SetMethod), 21114SemanticEdit(SemanticEditKind.Update, c => c.GetMembers<IPropertySymbol>("S.this[]").Single(m => m.Parameters is [{ Type.SpecialType: SpecialType.System_UInt32 }]).SetMethod)); 21142SemanticEdit(SemanticEditKind.Update, c => c.GetMembers<IPropertySymbol>("S.this[]").Single(m => m.Parameters is [{ Type.SpecialType: SpecialType.System_UInt32 }]).GetMethod), 21143SemanticEdit(SemanticEditKind.Update, c => c.GetMembers<IPropertySymbol>("S.this[]").Single(m => m.Parameters is [{ Type.SpecialType: SpecialType.System_Byte }]).SetMethod), 21144SemanticEdit(SemanticEditKind.Update, c => c.GetMembers<IPropertySymbol>("S.this[]").Single(m => m.Parameters is [{ Type.SpecialType: SpecialType.System_Int32 }])), 21145SemanticEdit(SemanticEditKind.Update, c => c.GetMembers<IPropertySymbol>("S.this[]").Single(m => m.Parameters is [{ Type.SpecialType: SpecialType.System_SByte }])),
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (3)
IOperation\FunctionPointerOperations.cs (2)
210Assert.Equal(SpecialType.System_String, signature.Parameters[0].Type.SpecialType); 211Assert.Equal(SpecialType.System_Void, signature.ReturnType.SpecialType);
IOperation\IOperationTests_ICompoundAssignmentOperation.cs (1)
86var inSymbol = implicitSymbols.Where(sym => sym.ReturnType.SpecialType == SpecialType.System_Int32).Single();
Microsoft.CodeAnalysis.CSharp.Scripting (16)
Hosting\ObjectFormatter\CSharpTypeNameFormatter.cs (16)
27protected override string GetPrimitiveTypeName(SpecialType type) 31case SpecialType.System_Boolean: return "bool"; 32case SpecialType.System_Byte: return "byte"; 33case SpecialType.System_Char: return "char"; 34case SpecialType.System_Decimal: return "decimal"; 35case SpecialType.System_Double: return "double"; 36case SpecialType.System_Int16: return "short"; 37case SpecialType.System_Int32: return "int"; 38case SpecialType.System_Int64: return "long"; 39case SpecialType.System_SByte: return "sbyte"; 40case SpecialType.System_Single: return "float"; 41case SpecialType.System_String: return "string"; 42case SpecialType.System_UInt16: return "ushort"; 43case SpecialType.System_UInt32: return "uint"; 44case SpecialType.System_UInt64: return "ulong"; 45case SpecialType.System_Object: return "object";
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (381)
Semantics\ConditionalOperatorTests.cs (1)
1303Assert.Equal(SpecialType.System_Boolean, model.GetTypeInfo(conditionalExpr.Condition).Type!.SpecialType);
Semantics\DeconstructionTests.cs (10)
5988Assert.Equal(SpecialType.System_Void, type.Type.SpecialType); 5989Assert.Equal(SpecialType.System_Void, type.ConvertedType.SpecialType); 6031Assert.Equal(SpecialType.System_Void, type.Type.SpecialType); 6032Assert.Equal(SpecialType.System_Void, type.ConvertedType.SpecialType); 6071Assert.Equal(SpecialType.System_Void, type.Type.SpecialType); 6072Assert.Equal(SpecialType.System_Void, type.ConvertedType.SpecialType); 6113Assert.Equal(SpecialType.System_Int32, type.Type.SpecialType); 6114Assert.Equal(SpecialType.System_Int32, type.ConvertedType.SpecialType); 6153Assert.Equal(SpecialType.System_Void, type.Type.SpecialType); 6154Assert.Equal(SpecialType.System_Void, type.ConvertedType.SpecialType);
Semantics\DelegateTypeTests.cs (27)
752Assert.Equal(SpecialType.System_Delegate, typeInfo.ConvertedType!.SpecialType); 898Assert.Equal(SpecialType.System_Delegate, typeInfo.ConvertedType!.SpecialType); 1214Assert.Equal(SpecialType.System_Delegate, typeInfo.ConvertedType!.SpecialType); 1250Assert.Equal(SpecialType.System_Delegate, typeInfo.ConvertedType!.SpecialType); 1335Assert.Equal(SpecialType.System_Delegate, typeInfo.ConvertedType!.SpecialType); 1375Assert.Equal(SpecialType.System_Delegate, typeInfo.ConvertedType!.SpecialType); 1418Assert.Equal(SpecialType.System_Delegate, typeInfo.ConvertedType!.SpecialType); 1462Assert.Equal(SpecialType.System_Delegate, typeInfo.ConvertedType!.SpecialType); 1557Assert.Equal(SpecialType.System_Delegate, typeInfo.ConvertedType!.SpecialType); 1637Assert.Equal(SpecialType.System_Delegate, typeInfo.ConvertedType!.SpecialType); 1687Assert.Equal(SpecialType.System_Delegate, typeInfo.ConvertedType!.SpecialType); 1737Assert.Equal(SpecialType.System_Delegate, typeInfo.ConvertedType!.SpecialType); 1787Assert.Equal(SpecialType.System_Delegate, typeInfo.ConvertedType!.SpecialType); 1837Assert.Equal(SpecialType.System_Delegate, typeInfo.ConvertedType!.SpecialType); 1887Assert.Equal(SpecialType.System_Delegate, typeInfo.ConvertedType!.SpecialType); 1937Assert.Equal(SpecialType.System_Delegate, typeInfo.ConvertedType!.SpecialType); 1983Assert.Equal(SpecialType.System_Delegate, typeInfo.ConvertedType!.SpecialType); 2031Assert.Equal(SpecialType.System_Delegate, typeInfo.ConvertedType!.SpecialType); 3708Assert.Equal(SpecialType.System_Delegate, typeInfo.ConvertedType!.SpecialType); 8129Assert.Equal(SpecialType.System_Delegate, typeInfo.ConvertedType!.SpecialType); 8152Assert.Equal(SpecialType.System_Delegate, typeInfo.ConvertedType!.SpecialType); 14479var expectedBaseType = ((CSharpCompilation)model.Compilation).GetSpecialType(SpecialType.System_MulticastDelegate); 14879verifyConversions(model, expr, comp.GetSpecialType(SpecialType.System_MulticastDelegate).GetPublicSymbol(), ConversionKind.FunctionType, ConversionKind.FunctionType); 14881verifyConversions(model, expr, getFunctionType(funcOfT.Construct(comp.GetSpecialType(SpecialType.System_Int32))), ConversionKind.FunctionType, ConversionKind.FunctionType); 14882verifyConversions(model, expr, getFunctionType(funcOfT.Construct(comp.GetSpecialType(SpecialType.System_Object))), ConversionKind.NoConversion, ConversionKind.NoConversion); 15689var objectType = comp.GetSpecialType(SpecialType.System_Object); 15690var stringType = comp.GetSpecialType(SpecialType.System_String);
Semantics\DynamicTests.cs (5)
70var dynamicToObject = c.Conversions.ClassifyConversionFromType(DynamicTypeSymbol.Instance, c.GetSpecialType(SpecialType.System_Object), ref useSiteDiagnostics); 71var objectToDynamic = c.Conversions.ClassifyConversionFromType(c.GetSpecialType(SpecialType.System_Object), DynamicTypeSymbol.Instance, ref useSiteDiagnostics); 2157var eraser = new DynamicTypeEraser(compilation.GetSpecialType(SpecialType.System_Object)); 2187Assert.Equal(SpecialType.System_Object, ebc.SpecialType); 4157var typeObject = comp.GetSpecialType(SpecialType.System_Object);
Semantics\ExpressionBodiedMemberTests.cs (9)
75Assert.Equal(SpecialType.System_Int32, semanticInfo.Type.SpecialType); 76Assert.Equal(SpecialType.System_Int32, semanticInfo.ConvertedType.SpecialType); 139Assert.Equal(SpecialType.System_Int32, semanticInfo.Type.SpecialType); 178Assert.Equal(SpecialType.System_String, semanticInfo.Type.SpecialType); 179Assert.Equal(SpecialType.System_Object, semanticInfo.ConvertedType.SpecialType); 226Assert.Equal(SpecialType.System_Int32, semanticInfo.Type.SpecialType); 227Assert.Equal(SpecialType.System_Int32, semanticInfo.ConvertedType.SpecialType); 315Assert.Equal(SpecialType.System_Int32, semanticInfo.Type.SpecialType); 316Assert.Equal(SpecialType.System_Int32, semanticInfo.ConvertedType.SpecialType);
Semantics\ForEachTests.cs (38)
1208Assert.Equal(SpecialType.System_Int32, info.ElementTypeWithAnnotations.SpecialType); 1220Assert.Equal(SpecialType.System_Collections_IEnumerable, boundNode.Expression.Type.SpecialType); 1245Assert.Equal(SpecialType.System_String, info.CollectionType.SpecialType); 1246Assert.Equal(SpecialType.System_Char, info.ElementTypeWithAnnotations.SpecialType); 1258Assert.Equal(SpecialType.System_String, boundNode.Expression.Type.SpecialType); 1259Assert.Equal(SpecialType.System_String, ((BoundConversion)boundNode.Expression).Operand.Type.SpecialType); 1290Assert.Equal(SpecialType.System_Int32, info.ElementTypeWithAnnotations.SpecialType); 1334Assert.Equal(SpecialType.System_Int32, info.ElementTypeWithAnnotations.SpecialType); 1367Assert.Equal(SpecialType.System_Object, info.ElementTypeWithAnnotations.SpecialType); 1407Assert.Equal(SpecialType.System_Int32, info.ElementTypeWithAnnotations.SpecialType); 1449Assert.Equal(SpecialType.System_Object, info.ElementTypeWithAnnotations.SpecialType); 1461Assert.Equal(SpecialType.System_Collections_IEnumerable, boundNode.Expression.Type.SpecialType); 1488Assert.Equal(SpecialType.System_Object, info.ElementTypeWithAnnotations.SpecialType); 1500Assert.Equal(SpecialType.System_Collections_IEnumerable, boundNode.Expression.Type.SpecialType); 1521Assert.Equal(SpecialType.System_Int32, info.ElementTypeWithAnnotations.SpecialType); 1532Assert.Equal(SpecialType.System_Int32, boundNode.IterationVariables.Single().Type.SpecialType); 1551Assert.Equal(SpecialType.System_String, info.CollectionType.SpecialType); 1552Assert.Equal(SpecialType.System_Char, info.ElementTypeWithAnnotations.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); 1669Assert.Equal(SpecialType.System_Object, info.ElementTypeWithAnnotations.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); 1743Assert.Equal(SpecialType.System_Object, info.ElementTypeWithAnnotations.SpecialType); 1827Assert.Equal(SpecialType.System_Object, info.ElementTypeWithAnnotations.SpecialType); 1874Assert.Equal(SpecialType.System_Int32, info.ElementTypeWithAnnotations.SpecialType); 2140Assert.Equal(SpecialType.System_Object, loopInfo.CurrentProperty.Type.SpecialType); 2144Assert.Equal(SpecialType.System_Char, typeInfo.Type.SpecialType); 2189Assert.Equal(SpecialType.System_String, loopInfo0.ElementType.SpecialType); 2198Assert.Equal(SpecialType.System_Object, loopInfo1.ElementType.SpecialType); // No longer string. 2890Assert.Equal(SpecialType.System_String, localSymbolType.SpecialType); 3117Assert.Equal(SpecialType.System_String, info.CollectionType.SpecialType); 3118Assert.Equal(SpecialType.System_Char, info.ElementTypeWithAnnotations.SpecialType); 3129Assert.Equal(SpecialType.System_Char, boundNode.IterationVariables.Single().Type.SpecialType); 3236Assert.Equal(SpecialType.System_Int32, info.ElementTypeWithAnnotations.SpecialType);
Semantics\FunctionPointerTests.cs (5)
211Assert.True(typeInfo.ConvertedType is IPointerTypeSymbol { PointedAtType: { SpecialType: SpecialType.System_Void } }); 1619Assert.Equal(SpecialType.System_String, methodSymbol.TypeArguments[0].SpecialType); 1621Assert.Equal(SpecialType.System_String, functionPointer.Signature.Parameters[0].Type.SpecialType); 1779Assert.Equal(SpecialType.System_String, methodSymbol.TypeArguments[0].SpecialType); 1781Assert.Equal(SpecialType.System_String, functionPointer.Signature.ReturnType.SpecialType);
Semantics\GenericConstraintsTests.cs (12)
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); 3175Assert.Equal(SpecialType.System_Int32, inferredMethod.TypeArguments.Single().SpecialType); 3230Assert.Equal(SpecialType.System_Int32, inferredMethod.TypeArguments.Single().SpecialType);
Semantics\ImplicitlyTypedLocalsTests.cs (1)
46Assert.Equal(SpecialType.System_Int32, fieldA.Type.SpecialType);
Semantics\InteractiveSemanticModelTests.cs (3)
126Assert.Equal(SpecialType.System_Int32, bindInfo.Type.SpecialType); 141Assert.Equal(SpecialType.System_Int32, bindInfo.Type.SpecialType); 268Assert.Equal(SpecialType.System_Char, semanticInfo.Type.SpecialType);
Semantics\InteractiveUsingTests.cs (5)
26Assert.Equal(SpecialType.System_String, GetSpeculativeType(sub, "String").SpecialType); 35Assert.Equal(SpecialType.System_Int32, GetSpeculativeType(sub, "I").SpecialType); 187Assert.Equal(SpecialType.System_Int32, GetSpeculativeType(sub1, "A").SpecialType); 190Assert.Equal(SpecialType.System_Int16, GetSpeculativeType(sub2, "A").SpecialType); 196Assert.Equal(SpecialType.System_Int64, GetSpeculativeType(sub4, "A").SpecialType);
Semantics\InterpolationTests.cs (6)
4429comp.MakeTypeMissing(SpecialType.System_Boolean); 4455comp.MakeTypeMissing(SpecialType.System_Void); 4607Assert.Equal(SpecialType.System_String, semanticInfo.Type.SpecialType); 4828Assert.Equal(SpecialType.System_Object, semanticInfo.ConvertedType.SpecialType); 4834Assert.Equal(SpecialType.System_String, semanticInfo.Type.SpecialType); 4835Assert.Equal(SpecialType.System_String, semanticInfo.ConvertedType.SpecialType);
Semantics\LambdaTests.cs (1)
8576Assert.Equal(SpecialType.System_Int32, symbol.Parameters[0].Type.SpecialType);
Semantics\LocalFunctionTests.cs (7)
458Assert.Equal(SpecialType.System_Int32, argType0.SpecialType); 464Assert.Equal(SpecialType.System_String, argType1.SpecialType); 620Assert.Equal(SpecialType.System_String, model.GetTypeInfo(arg1.Expression).Type.SpecialType); 624Assert.Equal(SpecialType.System_String, model.GetTypeInfo(arg2.Expression).Type.SpecialType); 628Assert.Equal(SpecialType.System_String, model.GetTypeInfo(arg3.Expression).Type.SpecialType); 673Assert.Equal(SpecialType.System_Boolean, model.GetTypeInfo(arg.Expression).Type.SpecialType); 727Assert.Equal(SpecialType.System_Boolean, model.GetTypeInfo(arg.Expression).Type.SpecialType);
Semantics\LockTests.cs (3)
48Assert.Equal(SpecialType.System_Object, localSymbol.Type.SpecialType); 667var symbol = compilation.GetSpecialType(SpecialType.System_String); 688var symbol = compilation.GetSpecialType(SpecialType.System_String);
Semantics\LookupTests.cs (1)
2009var m = ms.Where(mm => mm.Parameters[0].Type.SpecialType == SpecialType.System_Int32).Single();
Semantics\MethodTypeInferenceTests.cs (2)
1050Assert.Equal(SpecialType.System_Char, method.TypeArguments.Single().SpecialType); 1080Assert.Equal(SpecialType.System_Char, method.TypeArguments.Single().SpecialType);
Semantics\NativeIntegerTests.cs (36)
227Assert.Equal(signed ? SpecialType.System_IntPtr : SpecialType.System_UIntPtr, type.SpecialType); 242Assert.Equal(signed ? SpecialType.System_IntPtr : SpecialType.System_UIntPtr, type.SpecialType); 550var specialType = signed ? SpecialType.System_IntPtr : SpecialType.System_UIntPtr; 729private static void VerifyErrorType(NamedTypeSymbol type, SpecialType specialType, bool isNativeInt) 737private static void VerifyErrorType(INamedTypeSymbol type, SpecialType specialType, bool isNativeInt) 747var specialType = signed ? SpecialType.System_IntPtr : SpecialType.System_UIntPtr; 749VerifyErrorType(underlyingType, SpecialType.None, isNativeInt: false); 761var specialType = signed ? SpecialType.System_IntPtr : SpecialType.System_UIntPtr; 763VerifyErrorType(underlyingType, SpecialType.None, isNativeInt: false); 1544verifyInterfaces(comp, (NamedTypeSymbol)comp.GetMember<MethodSymbol>("I.F1").ReturnType, SpecialType.System_IntPtr, includesIEquatable); 1545verifyInterfaces(comp, (NamedTypeSymbol)comp.GetMember<MethodSymbol>("I.F2").ReturnType, SpecialType.System_UIntPtr, includesIEquatable); 1548static void verifyInterfaces(CSharpCompilation comp, NamedTypeSymbol type, SpecialType specialType, bool includesIEquatable) 1665VerifyErrorType(comp.CreateNativeIntegerTypeSymbol(signed: true), SpecialType.System_IntPtr, isNativeInt: true); 1666VerifyErrorType(comp.CreateNativeIntegerTypeSymbol(signed: false), SpecialType.System_UIntPtr, isNativeInt: true); 1667VerifyErrorType(((Compilation)comp).CreateNativeIntegerTypeSymbol(signed: true), SpecialType.System_IntPtr, isNativeInt: true); 1668VerifyErrorType(((Compilation)comp).CreateNativeIntegerTypeSymbol(signed: false), SpecialType.System_UIntPtr, isNativeInt: true); 3643Assert.Equal(SpecialType.None, 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); 4129Assert.Equal(SpecialType.None, type.SpecialType); 4847type.SpecialType == (signed ? SpecialType.System_IntPtr : SpecialType.System_UIntPtr);
Semantics\NullableConversionTests.cs (2)
812var nullableIntType = compilation.GetSpecialType(SpecialType.System_Nullable_T).Construct(compilation.GetSpecialType(SpecialType.System_Int32));
Semantics\NullableReferenceTypesTests.cs (1)
115919var modifiers = ImmutableArray.Create(CSharpCustomModifier.CreateOptional(comp.GetSpecialType(SpecialType.System_Object)));
Semantics\NullableTests.cs (2)
2212comp.MakeTypeMissing(SpecialType.System_Nullable_T); 2245comp.MakeTypeMissing(SpecialType.System_Nullable_T);
Semantics\NullCoalesceAssignmentTests.cs (3)
160var int32 = comp.GetSpecialType(SpecialType.System_Int32); 186Assert.Equal(SpecialType.System_Int32, semanticModel.GetTypeInfo(defaultLiteral).Type.SpecialType); 187Assert.Equal(SpecialType.System_Int32, semanticModel.GetTypeInfo(defaultLiteral).ConvertedType.SpecialType);
Semantics\ObjectAndCollectionInitializerTests.cs (7)
3844Assert.Equal(SpecialType.System_String, typeInfo.Type.SpecialType); 3845Assert.Equal(SpecialType.System_Object, typeInfo.ConvertedType.SpecialType); 3868Assert.Equal(SpecialType.System_Int32, typeInfo.Type.SpecialType); 3869Assert.Equal(SpecialType.System_Object, typeInfo.ConvertedType.SpecialType); 4099Assert.Equal(SpecialType.System_Int32, typeInfo.Type.SpecialType); 4100Assert.Equal(SpecialType.System_Int32, typeInfo.ConvertedType.SpecialType); 4171Assert.Equal(SpecialType.System_Int32, typeInfo.Type.SpecialType);
Semantics\OperatorTests.cs (28)
7061Assert.Equal(comp.GetSpecialType(SpecialType.System_Boolean), info.ConvertedType.GetSymbol()); 7216Assert.Equal(comp.GetSpecialType(SpecialType.System_Boolean).GetPublicSymbol(), info.ConvertedType); 7500type = compilation.CreatePointerTypeSymbol(compilation.GetSpecialType(SpecialType.System_Byte)); 7640symbol1.ContainingType.SpecialType == SpecialType.System_Char); 7869types[types.Length - 2] = compilation.CreatePointerTypeSymbol(compilation.GetSpecialType(SpecialType.System_Byte)); 7872types[types.Length - 1] = compilation.CreatePointerTypeSymbol(compilation.GetSpecialType(SpecialType.System_SByte)); 8029types[types.Length - 2] = compilation.CreatePointerTypeSymbol(compilation.GetSpecialType(SpecialType.System_Byte)); 8032types[types.Length - 1] = compilation.CreatePointerTypeSymbol(compilation.GetSpecialType(SpecialType.System_SByte)); 8179compilation.GetSpecialType(SpecialType.System_Boolean)); 8181else if (leftType.SpecialType == SpecialType.System_Delegate && rightType.SpecialType == SpecialType.System_Delegate) 8184compilation.GetSpecialType(SpecialType.System_Delegate), compilation.GetSpecialType(SpecialType.System_Delegate), 8185compilation.GetSpecialType(SpecialType.System_Boolean)); 8190compilation.GetSpecialType(SpecialType.System_Boolean)); 8231signature = new BinaryOperatorSignature(op | BinaryOperatorKind.Pointer, leftType, rightType, compilation.GetSpecialType(SpecialType.System_Int64)); 8260signature = new BinaryOperatorSignature(op | BinaryOperatorKind.Enum, leftType, rightType, compilation.GetSpecialType(SpecialType.System_Boolean)); 8283compilation.CreatePointerTypeSymbol(compilation.GetSpecialType(SpecialType.System_Void)), 8284compilation.CreatePointerTypeSymbol(compilation.GetSpecialType(SpecialType.System_Void)), 8285compilation.GetSpecialType(SpecialType.System_Boolean)); 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\OverloadResolutionTests.cs (1)
7262Assert.Equal(SpecialType.System_Int32, methodSymbol.TypeArguments.Single().SpecialType);
Semantics\QueryTests.cs (6)
2179Assert.Equal(SpecialType.System_Int32, info.Type.SpecialType); 2209Assert.Equal(SpecialType.System_Int32, info.Type.SpecialType); 2236Assert.Equal(SpecialType.System_Int32, info.Type.SpecialType); 2242Assert.Equal(SpecialType.System_Int32, info.Type.SpecialType); 2248Assert.Equal(SpecialType.System_Int32, info2.Type.SpecialType); 2301Assert.Equal(SpecialType.System_Int32, info.Type.SpecialType);
Semantics\RawInterpolationTests_Handler.cs (6)
2706comp.MakeTypeMissing(SpecialType.System_Boolean); 2731comp.MakeTypeMissing(SpecialType.System_Void); 2908Assert.Equal(SpecialType.System_String, semanticInfo.Type.SpecialType); 3129Assert.Equal(SpecialType.System_Object, semanticInfo.ConvertedType.SpecialType); 3135Assert.Equal(SpecialType.System_String, semanticInfo.Type.SpecialType); 3136Assert.Equal(SpecialType.System_String, semanticInfo.ConvertedType.SpecialType);
Semantics\RecordStructTests.cs (3)
395Assert.Equal(SpecialType.System_ValueType, point.BaseTypeNoUseSiteDiagnostics.SpecialType); 485Assert.Equal(SpecialType.System_ValueType, point.BaseTypeNoUseSiteDiagnostics.SpecialType); 4474comp.MakeTypeMissing(SpecialType.System_Boolean);
Semantics\RefFieldTests.cs (1)
2164Assert.Equal(SpecialType.System_Int16, type.EnumUnderlyingType.SpecialType);
Semantics\RefLocalsAndReturnsTests.cs (12)
4755Assert.Equal(SpecialType.System_Int32, ((IArrayTypeSymbol)model.GetTypeInfo(left).Type).ElementType.SpecialType); 4758Assert.Equal(SpecialType.System_Int32, model.GetTypeInfo(right).Type.SpecialType); 4783Assert.Equal(SpecialType.System_Int32, ((IPointerTypeSymbol)model.GetTypeInfo(left).Type).PointedAtType.SpecialType); 4786Assert.Equal(SpecialType.System_Int32, model.GetTypeInfo(right).Type.SpecialType); 4811Assert.Equal(SpecialType.System_Int32, ((IPointerTypeSymbol)model.GetTypeInfo(left).Type).PointedAtType.SpecialType); 4814Assert.Equal(SpecialType.System_Int32, model.GetTypeInfo(right).Type.SpecialType); 4839Assert.Equal(SpecialType.System_Int32, model.GetTypeInfo(left).Type.SpecialType); 4842Assert.Equal(SpecialType.System_Int32, model.GetTypeInfo(right).Type.SpecialType); 4870Assert.Equal(SpecialType.System_Int32, model.GetTypeInfo(right).Type.SpecialType); 4898Assert.Equal(SpecialType.System_Int32, model.GetTypeInfo(right).Type.SpecialType); 4929Assert.Equal(SpecialType.System_Object, model.GetTypeInfo(left).Type.SpecialType); 4932Assert.Equal(SpecialType.System_Int32, model.GetTypeInfo(right).Type.SpecialType);
Semantics\SimpleLambdaParametersWithModifiersTests.cs (31)
42Assert.Equal(SpecialType.System_Int32, symbol.Parameters.Single().Type.SpecialType); 68Assert.True(symbol.Parameters is [{ Type.SpecialType: SpecialType.System_String, RefKind: RefKind.None }, { Type.SpecialType: SpecialType.System_Int32, RefKind: RefKind.Ref }]); 101{ Type.SpecialType: SpecialType.System_String, RefKind: RefKind.None }, 102{ Type.SpecialType: SpecialType.System_Int32, RefKind: RefKind.Ref, IsOptional: false }]); 169Assert.True(symbol.Parameters is [{ Type.SpecialType: SpecialType.System_Int32, RefKind: RefKind.Ref, IsOptional: false }]); 387{ Type.SpecialType: SpecialType.System_String, RefKind: RefKind.None }, 388{ Type.SpecialType: SpecialType.System_Int32, RefKind: RefKind.Ref }]); 420Assert.True(symbol.Parameters is [{ Type.SpecialType: SpecialType.System_Int32, RefKind: RefKind.None, IsOptional: true }]); 481Assert.True(symbol.Parameters is [{ Name: "", Type.SpecialType: SpecialType.System_Int32, RefKind: RefKind.Ref, IsOptional: false }]); 579Assert.True(symbol.Parameters is [{ Name: "x", Type.SpecialType: SpecialType.System_Int32, RefKind: RefKind.Ref, IsOptional: false }]); 612Assert.True(symbol.Parameters is [{ Name: "x", Type.SpecialType: SpecialType.System_Int32, IsOptional: false } parameter] && 641Assert.True(symbol.Parameters is [{ Name: "x", Type.SpecialType: SpecialType.System_String, RefKind: RefKind.Ref, IsOptional: false }]); 669Assert.True(symbol.Parameters is [{ Name: "x", Type.SpecialType: SpecialType.System_Int32, RefKind: RefKind.In, IsOptional: false }]); 701Assert.True(symbol.Parameters is [{ Name: "x", Type.SpecialType: SpecialType.System_Int32, RefKind: RefKind.In, IsOptional: false }]); 730Assert.True(symbol.Parameters is [{ Name: "x", Type.SpecialType: SpecialType.System_Int32, RefKind: RefKind.Out, IsOptional: false }]); 759Assert.True(symbol.Parameters is [{ Name: "x", Type.SpecialType: SpecialType.System_Int32, RefKind: RefKind.Out, IsOptional: false }]); 790Assert.True(symbol.Parameters is [{ Name: "x", Type.SpecialType: SpecialType.System_Int32, RefKind: RefKind.Ref, IsOptional: false }]); 824Assert.True(symbol.Parameters is [{ Name: "x", Type.SpecialType: SpecialType.System_String, Type.NullableAnnotation: CodeAnalysis.NullableAnnotation.Annotated, RefKind: RefKind.Ref, IsOptional: false }]); 858Assert.True(symbol.Parameters is [{ Name: "x", Type.SpecialType: SpecialType.System_String, Type.NullableAnnotation: CodeAnalysis.NullableAnnotation.NotAnnotated, RefKind: RefKind.Ref, IsOptional: false }]); 936Assert.True(symbol.Parameters is [{ Name: "x", Type: IArrayTypeSymbol { ElementType.SpecialType: SpecialType.System_Int32 }, IsParams: true }]); 964Assert.True(symbol.Parameters is [{ Name: "x", Type: IArrayTypeSymbol { ElementType.SpecialType: SpecialType.System_Int32 }, IsParams: false }]); 1001Assert.Equal(SpecialType.System_Int32, symbol.Parameters.Single().Type.SpecialType); 1040Assert.True(symbol.Parameters is [{ Name: "x", Type: IArrayTypeSymbol { ElementType.SpecialType: SpecialType.System_Int32 }, RefKind: RefKind.Ref, IsParams: true }]); 1075Assert.True(symbol.Parameters is [{ Name: "x", Type: IArrayTypeSymbol { ElementType.SpecialType: SpecialType.System_Int32 }, RefKind: RefKind.Ref, IsParams: true }]); 1223Assert.True(symbol.Parameters is [{ Name: "x", Type.SpecialType: SpecialType.System_Int32, IsParams: true }]); 1333Assert.Equal(SpecialType.System_Int32, symbol.Parameters.Single().Type.SpecialType); 1363Assert.Equal(SpecialType.System_Int32, symbol.Parameters.Single().Type.SpecialType); 1390Assert.Equal(SpecialType.System_Int32, symbol.Parameters.Single().Type.SpecialType); 1423Assert.Equal(SpecialType.System_Int32, symbol.Parameters.Single().Type.SpecialType); 1456Assert.Equal(SpecialType.None, symbol.Parameters.Single().Type.SpecialType);
Semantics\StackAllocInitializerTests.cs (13)
1054Assert.Equal(SpecialType.System_Int32, ((IPointerTypeSymbol)obj1Value.Type).PointedAtType.SpecialType); 1062Assert.Equal(SpecialType.System_Int32, ((IPointerTypeSymbol)obj2Value.Type).PointedAtType.SpecialType); 1063Assert.Equal(SpecialType.System_Int32, ((IPointerTypeSymbol)obj2Value.ConvertedType).PointedAtType.SpecialType); 1078Assert.Equal(SpecialType.System_Int32, ((IPointerTypeSymbol)obj4Value.Type).PointedAtType.SpecialType); 1079Assert.Equal(SpecialType.System_Int32, ((IPointerTypeSymbol)obj4Value.ConvertedType).PointedAtType.SpecialType); 1086Assert.Equal(SpecialType.System_Int32, ((IPointerTypeSymbol)obj5Value.Type).PointedAtType.SpecialType); 1087Assert.Equal(SpecialType.System_Double, ((IPointerTypeSymbol)obj5Value.ConvertedType).PointedAtType.SpecialType); 1165Assert.Equal(SpecialType.System_Int32, ((IPointerTypeSymbol)obj2Value.Type).PointedAtType.SpecialType); 1166Assert.Equal(SpecialType.System_Int32, ((IPointerTypeSymbol)obj2Value.ConvertedType).PointedAtType.SpecialType); 1181Assert.Equal(SpecialType.System_Int32, ((IPointerTypeSymbol)obj4Value.Type).PointedAtType.SpecialType); 1182Assert.Equal(SpecialType.System_Int32, ((IPointerTypeSymbol)obj4Value.ConvertedType).PointedAtType.SpecialType); 1189Assert.Equal(SpecialType.System_Int32, ((IPointerTypeSymbol)obj5Value.Type).PointedAtType.SpecialType); 1190Assert.Equal(SpecialType.System_Double, ((IPointerTypeSymbol)obj5Value.ConvertedType).PointedAtType.SpecialType);
Semantics\StackAllocSpanExpressionsTests.cs (13)
60Assert.Equal(SpecialType.System_Int32, ((IPointerTypeSymbol)obj1Value.Type).PointedAtType.SpecialType); 68Assert.Equal(SpecialType.System_Int32, ((IPointerTypeSymbol)obj2Value.Type).PointedAtType.SpecialType); 69Assert.Equal(SpecialType.System_Int32, ((IPointerTypeSymbol)obj2Value.ConvertedType).PointedAtType.SpecialType); 84Assert.Equal(SpecialType.System_Int32, ((IPointerTypeSymbol)obj4Value.Type).PointedAtType.SpecialType); 85Assert.Equal(SpecialType.System_Int32, ((IPointerTypeSymbol)obj4Value.ConvertedType).PointedAtType.SpecialType); 92Assert.Equal(SpecialType.System_Int32, ((IPointerTypeSymbol)obj5Value.Type).PointedAtType.SpecialType); 93Assert.Equal(SpecialType.System_Double, ((IPointerTypeSymbol)obj5Value.ConvertedType).PointedAtType.SpecialType); 143Assert.Equal(SpecialType.System_Int32, ((IPointerTypeSymbol)obj2Value.Type).PointedAtType.SpecialType); 144Assert.Equal(SpecialType.System_Int32, ((IPointerTypeSymbol)obj2Value.ConvertedType).PointedAtType.SpecialType); 159Assert.Equal(SpecialType.System_Int32, ((IPointerTypeSymbol)obj4Value.Type).PointedAtType.SpecialType); 160Assert.Equal(SpecialType.System_Int32, ((IPointerTypeSymbol)obj4Value.ConvertedType).PointedAtType.SpecialType); 167Assert.Equal(SpecialType.System_Int32, ((IPointerTypeSymbol)obj5Value.Type).PointedAtType.SpecialType); 168Assert.Equal(SpecialType.System_Double, ((IPointerTypeSymbol)obj5Value.ConvertedType).PointedAtType.SpecialType);
Semantics\TargetTypedConditionalOperatorTests.cs (1)
363Assert.Equal(SpecialType.System_Boolean, model.GetTypeInfo(conditionalExpr.Condition).Type!.SpecialType);
Semantics\TopLevelStatementsTests.cs (4)
7490comp.MakeTypeMissing(SpecialType.System_Int32); 7512comp.MakeTypeMissing(SpecialType.System_Int32); 7576comp.MakeTypeMissing(SpecialType.System_Int32); 7607comp.MakeTypeMissing(SpecialType.System_String);
Semantics\UnsafeTests.cs (54)
5898Assert.False(compilation.GetSpecialType(SpecialType.System_ArgIterator).IsManagedTypeNoUseSiteDiagnostics); 5899Assert.False(compilation.GetSpecialType(SpecialType.System_RuntimeArgumentHandle).IsManagedTypeNoUseSiteDiagnostics); 5915Assert.True(libComp.GetSpecialType(SpecialType.System_TypedReference).IsManagedTypeNoUseSiteDiagnostics); 5947Assert.Equal(SpecialType.System_TypedReference, ((PointerTypeSymbol)returnType).PointedAtType.SpecialType); 5951Assert.Equal(SpecialType.System_TypedReference, ((PointerTypeSymbol)parameterType).PointedAtType.SpecialType); 6037Assert.True(comp.GetSpecialType(SpecialType.System_TypedReference).IsManagedTypeNoUseSiteDiagnostics); 6058Assert.True(comp.GetSpecialType(SpecialType.System_TypedReference).IsManagedTypeNoUseSiteDiagnostics); 6079Assert.True(comp.GetSpecialType(SpecialType.System_TypedReference).IsManagedTypeNoUseSiteDiagnostics); 6120Assert.True(comp.GetSpecialType(SpecialType.System_TypedReference).IsManagedTypeNoUseSiteDiagnostics); 7272Assert.Equal(SpecialType.System_Int32, ((IPointerTypeSymbol)type).PointedAtType.SpecialType); 7549Assert.Equal(SpecialType.System_Int32, type.SpecialType); 7882Assert.Equal(SpecialType.System_Void, callSummary.Type.SpecialType); 7883Assert.Equal(SpecialType.System_Void, callSummary.ConvertedType.SpecialType); 7945Assert.Equal(SpecialType.System_Void, callSummary.Type.SpecialType); 8165var intType = compilation.GetSpecialType(SpecialType.System_Int32); 8232var intType = compilation.GetSpecialType(SpecialType.System_Int32); 8290var intType = compilation.GetSpecialType(SpecialType.System_Int32); 8388Assert.NotEqual(SpecialType.System_Void, ((IPointerTypeSymbol)type).PointedAtType.SpecialType); 8392Assert.Equal(SpecialType.System_Void, ((IPointerTypeSymbol)convertedType).PointedAtType.SpecialType); 8917Assert.Equal(SpecialType.System_Int64, summary.Type.SpecialType); 8918Assert.Equal(SpecialType.System_Int64, summary.ConvertedType.SpecialType); 9344Assert.Equal(SpecialType.System_Boolean, summary.Type.SpecialType); 9345Assert.Equal(SpecialType.System_Boolean, summary.ConvertedType.SpecialType); 10187Assert.Equal(SpecialType.System_Char, ((IPointerTypeSymbol)type).PointedAtType.SpecialType); 10218var stringSymbol = compilation.GetSpecialType(SpecialType.System_String); 10219var charSymbol = compilation.GetSpecialType(SpecialType.System_Char); 10290var stringSymbol = compilation.GetSpecialType(SpecialType.System_String); 10291var charSymbol = compilation.GetSpecialType(SpecialType.System_Char); 10293var voidSymbol = compilation.GetSpecialType(SpecialType.System_Void); 10579private static readonly Dictionary<SpecialType, int> s_specialTypeSizeOfMap = new Dictionary<SpecialType, int> 10581{ SpecialType.System_SByte, 1 }, 10582{ SpecialType.System_Byte, 1 }, 10583{ SpecialType.System_Int16, 2 }, 10584{ SpecialType.System_UInt16, 2 }, 10585{ SpecialType.System_Int32, 4 }, 10586{ SpecialType.System_UInt32, 4 }, 10587{ SpecialType.System_Int64, 8 }, 10588{ SpecialType.System_UInt64, 8 }, 10589{ SpecialType.System_Char, 2 }, 10590{ SpecialType.System_Single, 4 }, 10591{ SpecialType.System_Double, 8 }, 10592{ SpecialType.System_Boolean, 1 }, 10593{ SpecialType.System_Decimal, 16 }, 10636Assert.NotEqual(SpecialType.None, type.SpecialType); 10649Assert.Equal(SpecialType.System_Int32, sizeOfSummary.Type.SpecialType); 10711Assert.Equal(SpecialType.System_Int32, sizeOfSummary.Type.SpecialType); 10758Assert.Equal(SpecialType.None, type.SpecialType); 10771Assert.Equal(SpecialType.System_Int32, sizeOfSummary.Type.SpecialType); 11311Assert.Equal(SpecialType.System_Char, ((IPointerTypeSymbol)stackAllocSummary.Type).PointedAtType.SpecialType); 11312Assert.Equal(SpecialType.System_Void, ((IPointerTypeSymbol)stackAllocSummary.ConvertedType).PointedAtType.SpecialType); 11323Assert.Equal(SpecialType.System_Char, typeSummary.Type.SpecialType); 11335Assert.Equal(SpecialType.System_Int16, countSummary.Type.SpecialType); 11336Assert.Equal(SpecialType.System_Int32, countSummary.ConvertedType.SpecialType);
Semantics\UsingStatementTests.cs (2)
67Assert.Equal(SpecialType.System_IDisposable, declaredLocal.Type.SpecialType); 1855Assert.Equal(SpecialType.System_Int32, model.GetTypeInfo(node).Type.SpecialType);
Semantics\Utf8StringsLiteralsTests.cs (2)
1917comp.MakeTypeMissing(SpecialType.System_Byte); 1944comp.MakeTypeMissing(SpecialType.System_Int32);
Utilities\ValueSetTests.cs (17)
492Assert.Same(ForByte, ForSpecialType(SpecialType.System_Byte)); 493Assert.Same(ForSByte, ForSpecialType(SpecialType.System_SByte)); 494Assert.Same(ForShort, ForSpecialType(SpecialType.System_Int16)); 495Assert.Same(ForUShort, ForSpecialType(SpecialType.System_UInt16)); 496Assert.Same(ForInt, ForSpecialType(SpecialType.System_Int32)); 497Assert.Same(ForUInt, ForSpecialType(SpecialType.System_UInt32)); 498Assert.Same(ForLong, ForSpecialType(SpecialType.System_Int64)); 499Assert.Same(ForULong, ForSpecialType(SpecialType.System_UInt64)); 500Assert.Same(ForFloat, ForSpecialType(SpecialType.System_Single)); 501Assert.Same(ForDouble, ForSpecialType(SpecialType.System_Double)); 502Assert.Same(ForString, ForSpecialType(SpecialType.System_String)); 503Assert.Same(ForDecimal, ForSpecialType(SpecialType.System_Decimal)); 504Assert.Same(ForChar, ForSpecialType(SpecialType.System_Char)); 505Assert.Same(ForBool, ForSpecialType(SpecialType.System_Boolean)); 506Assert.Same(ForNint, ForSpecialType(SpecialType.System_IntPtr, isNative: true)); 507Assert.Same(ForNuint, ForSpecialType(SpecialType.System_UIntPtr, isNative: true)); 508Assert.Null(ForSpecialType(SpecialType.System_Enum));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (515)
Compilation\CompilationAPITests.cs (48)
1512comp.GetSpecialType((SpecialType)100); 1518comp.GetSpecialType(SpecialType.None); 1524comp.GetSpecialType((SpecialType)000); 1530comp.GetSpecialType(default(SpecialType)); 2460var elementType = comp.GetSpecialType(SpecialType.System_Object); 2489var elementType = comp.GetSpecialType(SpecialType.System_Object); 2519ImmutableArray.Create((ITypeSymbol)compilation.GetSpecialType(SpecialType.System_Int32), 2520(ITypeSymbol)compilation.GetSpecialType(SpecialType.System_Int32)), 2531ImmutableArray.Create((ITypeSymbol)compilation.GetSpecialType(SpecialType.System_Int32), 2532(ITypeSymbol)compilation.GetSpecialType(SpecialType.System_Int32)), 2543ImmutableArray.Create((ITypeSymbol)compilation.GetSpecialType(SpecialType.System_Int32), 2544(ITypeSymbol)compilation.GetSpecialType(SpecialType.System_Int32)), 2555ImmutableArray.Create((ITypeSymbol)compilation.GetSpecialType(SpecialType.System_Int32), 2556(ITypeSymbol)compilation.GetSpecialType(SpecialType.System_Int32)), 2597ImmutableArray.Create((ITypeSymbol)compilation.GetSpecialType(SpecialType.System_Int32)), 2606ImmutableArray.Create<ITypeSymbol>(compilation.GetSpecialType(SpecialType.System_Int32)), 2625ImmutableArray.Create<ITypeSymbol>(compilation.GetSpecialType(SpecialType.System_Int32), 2626compilation.GetSpecialType(SpecialType.System_Int32)), 2642ImmutableArray.Create<ITypeSymbol>(compilation.GetSpecialType(SpecialType.System_Int32), compilation.GetSpecialType(SpecialType.System_Boolean)), 2657var memberTypes = ImmutableArray.Create<ITypeSymbol>(comp.GetSpecialType(SpecialType.System_Object), comp.GetSpecialType(SpecialType.System_String)); 2697var memberTypes = ImmutableArray.Create<ITypeSymbol>(comp.GetSpecialType(SpecialType.System_Object), comp.GetSpecialType(SpecialType.System_String)); 2741var intType = compilation.GetSpecialType(SpecialType.System_Int32).GetPublicSymbol(); 2758var intType = compilation.GetSpecialType(SpecialType.System_Int32).GetPublicSymbol(); 2759var boolType = compilation.GetSpecialType(SpecialType.System_Boolean).GetPublicSymbol(); 2778var intType = compilation.GetSpecialType(SpecialType.System_Int32).GetPublicSymbol(); 2788var intType = compilation.GetSpecialType(SpecialType.System_Int32).GetPublicSymbol(); 2789var nullableIntType = compilation.GetSpecialType(SpecialType.System_Nullable_T).GetPublicSymbol().Construct(intType); 2816var intType = compilation.GetSpecialType(SpecialType.System_Int32).GetPublicSymbol(); 2836var intType = compilation.GetSpecialType(SpecialType.System_Int32).GetPublicSymbol(); 2871var intType = compilation.GetSpecialType(SpecialType.System_Int32).GetPublicSymbol(); 2903var intType = compilation.GetSpecialType(SpecialType.System_Int32).GetPublicSymbol(); 2937var intType = compilation.GetSpecialType(SpecialType.System_Int32).GetPublicSymbol(); 2949var boolType = compilation.GetSpecialType(SpecialType.System_Boolean).GetPublicSymbol(); 2968var intType = compilation.GetSpecialType(SpecialType.System_Int32).GetPublicSymbol(); 2978var intType = compilation.GetSpecialType(SpecialType.System_Int32).GetPublicSymbol(); 2979var nullableIntType = compilation.GetSpecialType(SpecialType.System_Nullable_T).GetPublicSymbol().Construct(intType); 3014var intType = compilation.GetSpecialType(SpecialType.System_Int32).GetPublicSymbol(); 3031var typeArguments = ImmutableArray.Create<ITypeSymbol>(comp.GetSpecialType(SpecialType.System_Object), comp.GetSpecialType(SpecialType.System_String)); 3051typeArguments = ImmutableArray.Create<ITypeSymbol>(comp.GetSpecialType(SpecialType.System_Object), comp.GetSpecialType(SpecialType.System_String)); 3066var typeArguments = ImmutableArray.Create<ITypeSymbol>(comp.GetSpecialType(SpecialType.System_Object), comp.GetSpecialType(SpecialType.System_String)); 3086typeArguments = ImmutableArray.Create<ITypeSymbol>(comp.GetSpecialType(SpecialType.System_Object), comp.GetSpecialType(SpecialType.System_String));
Compilation\GetSemanticInfoBrokenCodeTests.cs (1)
271Assert.Equal(SpecialType.System_Int32, info.Type.SpecialType);
Compilation\GetSemanticInfoTests.cs (52)
381ConversionTestHelper(model, (v1 as CastExpressionSyntax).Expression, comp.GetSpecialType(SpecialType.System_UInt32), ConversionKind.ExplicitNumeric); 384ConversionTestHelper(model, (v2 as AssignmentExpressionSyntax).Right, comp.GetSpecialType(SpecialType.System_Object), ConversionKind.Boxing); 387ConversionTestHelper(model, (v3 as CastExpressionSyntax).Expression, comp.GetSpecialType(SpecialType.System_Int32), ConversionKind.Unboxing); 1143Assert.Equal(SpecialType.System_Boolean, info.Type.SpecialType); 1325Assert.Equal(SpecialType.System_Void, bindInfo.Type.SpecialType); 1352Assert.Equal(SpecialType.System_Void, bindInfo.Type.SpecialType); 1380Assert.Equal(SpecialType.System_Void, bindInfo.Type.SpecialType); 1422Assert.Equal(SpecialType.System_Int32, bindInfo.Type.SpecialType); 1423Assert.Equal(SpecialType.System_Int32, bindInfo.ConvertedType.SpecialType); 1463Assert.Equal(SpecialType.System_Int32, bindInfo.Type.SpecialType); //still have the type since all candidates agree 1464Assert.Equal(SpecialType.System_Int32, bindInfo.ConvertedType.SpecialType); 2458Assert.Equal(SpecialType.System_Double, info.Type.SpecialType); 2459Assert.Equal(SpecialType.System_Double, info.ConvertedType.SpecialType); 2487Assert.Equal(SpecialType.System_Int32, info.Type.SpecialType); 2488Assert.Equal(SpecialType.System_Int32, info.ConvertedType.SpecialType); 2511Assert.Equal(SpecialType.System_Int32, info.Type.SpecialType); 2512Assert.Equal(SpecialType.System_Int32, info.ConvertedType.SpecialType); 3611Assert.Equal(SpecialType.System_Int32, literalTypeInfo.Type.SpecialType); 3612Assert.Equal(SpecialType.System_Object, literalTypeInfo.ConvertedType.SpecialType); 3636Assert.Equal(SpecialType.System_Int32, literalTypeInfo.Type.SpecialType); 3637Assert.Equal(SpecialType.System_Int32, literalTypeInfo.ConvertedType.SpecialType); 3644Assert.Equal(SpecialType.System_Int64, castTypeInfo.Type.SpecialType); 3645Assert.Equal(SpecialType.System_Object, castTypeInfo.ConvertedType.SpecialType); 3669Assert.Equal(SpecialType.System_Int32, literalTypeInfo.Type.SpecialType); 3670Assert.Equal(SpecialType.System_Int32, literalTypeInfo.ConvertedType.SpecialType); 3677Assert.Equal(SpecialType.System_Object, castTypeInfo.Type.SpecialType); 3678Assert.Equal(SpecialType.System_Object, castTypeInfo.ConvertedType.SpecialType); 3705Assert.Equal(SpecialType.System_Int32, literalTypeInfo.Type.SpecialType); 3706Assert.Equal(SpecialType.System_Int32, literalTypeInfo.ConvertedType.SpecialType); 3713Assert.Equal(SpecialType.System_Int64, cast1TypeInfo.Type.SpecialType); 3714Assert.Equal(SpecialType.System_Int64, cast1TypeInfo.ConvertedType.SpecialType); 3725Assert.Equal(SpecialType.System_Object, cast2TypeInfo.Type.SpecialType); 3726Assert.Equal(SpecialType.System_Object, cast2TypeInfo.ConvertedType.SpecialType); 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); 4116Assert.Equal(SpecialType.System_Collections_Generic_IEnumerable_T, ((ITypeSymbol)info0.Symbol.OriginalDefinition).SpecialType); 4117Assert.Equal(SpecialType.System_Int32, ((INamedTypeSymbol)info0.Symbol).TypeArguments.Single().SpecialType); 4120Assert.Equal(SpecialType.System_Int32, ((ITypeSymbol)info1.Symbol).SpecialType); 4124Assert.Equal(SpecialType.System_Collections_Generic_IEnumerable_T, ((ITypeSymbol)info2.Symbol.OriginalDefinition).SpecialType); 4125Assert.Equal(SpecialType.System_Int32, ((INamedTypeSymbol)info2.Symbol).TypeArguments.Single().SpecialType); 4171Assert.Equal(SpecialType.System_Int32, ((ITypeSymbol)info1.Symbol).SpecialType); 4175Assert.Equal(SpecialType.System_Collections_Generic_IEnumerable_T, ((ITypeSymbol)info2.Symbol.OriginalDefinition).SpecialType); 4176Assert.Equal(SpecialType.System_Int32, ((INamedTypeSymbol)info2.Symbol).TypeArguments.Single().SpecialType); 5399var objectType = compilation.GetSpecialType(SpecialType.System_Object); 5523var otherFuncType = comp.GetWellKnownType(WellKnownType.System_Func_T).Construct(comp.GetSpecialType(SpecialType.System_Int32)); 5537var otherFuncType = comp.GetWellKnownType(WellKnownType.System_Func_T).Construct(comp.GetSpecialType(SpecialType.System_Int32)); 5727var typeInt = comp.GetSpecialType(SpecialType.System_Int32); 5916Assert.Equal(SpecialType.System_Boolean, model.GetTypeInfo(expr).Type.SpecialType); 5925var specialType = (SpecialType)(-1); 5948var specialType = SpecialType.Count + 1;
Compilation\QueryClauseInfoTests.cs (2)
21var obj = c.GetSpecialType(SpecialType.System_Object); 22var int32 = c.GetSpecialType(SpecialType.System_Int32);
Compilation\SemanticModelAPITests.cs (32)
55Assert.Equal(SpecialType.System_Int32, typeInfo.Type.SpecialType); 59Assert.Equal(SpecialType.System_Char, typeInfo.Type.SpecialType); 142Assert.Equal(SpecialType.System_Int32, typeInfo.Type.SpecialType); 152Assert.Equal(SpecialType.System_Char, typeInfo.Type.SpecialType); 708Assert.Equal(compilation.GetSpecialType(SpecialType.System_String), (info.Symbol as IArrayTypeSymbol).ElementType); 1929Assert.Equal(ConstantValue.Default(SpecialType.System_Int32), labelSymbol.SwitchCaseLabelConstant); 3132Assert.Equal(SpecialType.System_Decimal, typeInfo.Type.SpecialType); 3133Assert.Equal(SpecialType.System_Object, typeInfo.ConvertedType.SpecialType); 3197Assert.Equal(SpecialType.System_Int32, info.Type.SpecialType); 3232Assert.Equal(SpecialType.System_Int32, info.Type.SpecialType); 3233Assert.Equal(SpecialType.System_Int64, info.ConvertedType.SpecialType); 3776var stringType = comp.GetSpecialType(SpecialType.System_String); 3947Assert.True(typeInfo0.Type != null && typeInfo0.Type.SpecialType == SpecialType.System_Int16); 3954var type1 = comp.GetSpecialType(SpecialType.System_Nullable_T).Construct(comp.GetSpecialType(SpecialType.System_Int32)); 3961var type2 = comp.GetSpecialType(SpecialType.System_Nullable_T).Construct(comp.GetSpecialType(SpecialType.System_Int32)); 4221Assert.Equal(SpecialType.System_String, model.GetTypeInfo(actual[0]).Type.SpecialType); 4246Assert.Equal(SpecialType.System_Int32, model.GetTypeInfo(actual[0]).Type.SpecialType); 4250Assert.Equal(SpecialType.System_Boolean, model.GetTypeInfo(actual[1]).Type.SpecialType); 4311Assert.Equal(SpecialType.System_String, model.GetTypeInfo(actual[0]).Type.SpecialType); 4315Assert.Equal(SpecialType.System_String, model.GetTypeInfo(actual[1]).Type.SpecialType); 4318Assert.Equal(SpecialType.System_String, model.GetTypeInfo(actual[2]).Type.SpecialType); 4322Assert.Equal(SpecialType.System_String, model.GetTypeInfo(actual[3]).Type.SpecialType); 4326Assert.Equal(SpecialType.System_String, model.GetTypeInfo(actual[4]).Type.SpecialType); 4330Assert.Equal(SpecialType.System_String, model.GetTypeInfo(actual[5]).Type.SpecialType); 4334Assert.Equal(SpecialType.System_String, model.GetTypeInfo(actual[6]).Type.SpecialType); 4338Assert.Equal(SpecialType.System_String, model.GetTypeInfo(actual[7]).Type.SpecialType); 4464Assert.Equal(SpecialType.System_Boolean, originalTypeInfo.Type.SpecialType); 4467Assert.Equal(SpecialType.System_Boolean, speculativeTypeInfo.Type.SpecialType); 4535Assert.Equal(SpecialType.System_String, type.TupleElements[0].Type.SpecialType); 4536Assert.Equal(SpecialType.System_Int32, type.TupleElements[1].Type.SpecialType);
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (9)
347Assert.Equal(SpecialType.System_Int32, paramSymbol.Type.SpecialType); 724Assert.Equal(ConstantValue.Default(SpecialType.System_Int32), labelSymbol.SwitchCaseLabelConstant); 1387Assert.Equal(9, symbolsInC.Where(s => s.ContainingType == null || s.ContainingType.SpecialType != SpecialType.System_Object).Count()); 1767var baseType = compilation.GetSpecialType(SpecialType.System_Object); 1776var valueType = compilation.GetSpecialType(SpecialType.System_Int32); 1823var type = compilation.GetSpecialType(SpecialType.System_Collections_Generic_IList_T); 1824type = type.Construct(compilation.GetSpecialType(SpecialType.System_String)); 1833type = compilation.GetSpecialType(SpecialType.System_Double); 3674Assert.Equal(SpecialType.System_Int32, parameter.Type.SpecialType);
Compilation\SemanticModelGetSemanticInfoTests.cs (18)
337Assert.Equal(SpecialType.System_String, semanticInfo.Type.SpecialType); 425Assert.Equal(SpecialType.System_String, semanticInfo.Type.SpecialType); 1282type = compilation.GetSpecialType(SpecialType.System_String); 1309type = compilation.GetSpecialType(SpecialType.System_String); 5351Assert.Equal(SpecialType.System_Int32, semanticInfo.Type.SpecialType); 5376Assert.Equal(SpecialType.System_Int32, semanticInfo.Type.SpecialType); 6085Assert.Equal(SpecialType.System_Void, semanticInfo.Type.SpecialType); 6204Assert.Equal(SpecialType.System_Int32, semanticInfo.Type.SpecialType); 6224Assert.Equal(SpecialType.System_String, ((IArrayTypeSymbol)semanticInfo.Type).ElementType.SpecialType); 6226Assert.Equal(SpecialType.System_Collections_IEnumerable, semanticInfo.ConvertedType.SpecialType); 6246Assert.Equal(SpecialType.System_String, semanticInfo.Type.SpecialType); 6250Assert.Equal(SpecialType.System_String, ((ITypeSymbol)symbol).SpecialType); 8168Assert.Equal(SpecialType.System_Int32, semanticInfo.Type.SpecialType); 8192Assert.Equal(SpecialType.System_Int32, semanticInfo.Type.SpecialType); 8213Assert.Equal(SpecialType.System_Int32, semanticInfo.Type.SpecialType); 8329Assert.Equal(SpecialType.System_Int32, semanticInfo.Type.SpecialType); 9091Assert.Equal(SpecialType.System_Int32, semanticInfo.Type.SpecialType); 10980Assert.Equal(SpecialType.System_Int32, semanticInfo.Type.SpecialType);
Compilation\SemanticModelGetSemanticInfoTests_LateBound.cs (2)
379Assert.Equal(SpecialType.System_Int32, semanticInfo.Type.SpecialType); 380Assert.Equal(SpecialType.System_Int32, semanticInfo.ConvertedType.SpecialType);
Compilation\TypeInfoTests.cs (4)
20var obj = c.GetSpecialType(SpecialType.System_Object).GetPublicSymbol(); 21var int32 = c.GetSpecialType(SpecialType.System_Int32).GetPublicSymbol(); 45var intEnum1 = c.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T).GetPublicSymbol().Construct(int32); 46var intEnum2 = c.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T).GetPublicSymbol().Construct(int32);
DocumentationComments\CrefTests.cs (16)
1270Single(m => m.Parameters.Single().Type.SpecialType == SpecialType.System_Int32); 2218var expectedSymbol = compilation.GetSpecialType(SpecialType.System_Int32); 2412Single(method => method.ParameterTypesWithAnnotations.Single().SpecialType == SpecialType.System_Int32); 2597Single(method => method.ParameterTypesWithAnnotations.First().SpecialType == SpecialType.System_Int32); 2805Single(method => method.ParameterTypesWithAnnotations.Single().SpecialType == SpecialType.System_Int32); 2841Single(method => method.ParameterTypesWithAnnotations.Single().SpecialType == SpecialType.System_Int32 && method.ReturnType.SpecialType == SpecialType.System_Int32); 3006var typeInt = ((Compilation)compilation).GetSpecialType(SpecialType.System_Int32); 3078var expectedParameterType = compilation.GetSpecialType(SpecialType.System_Int32).ISymbol; 3136var expectedReturnType = compilation.GetSpecialType(SpecialType.System_Int32).ISymbol; 5403Assert.Equal(compilation.GetSpecialType(SpecialType.System_Int32), model.GetSymbolInfo(crefSyntaxes[0]).Symbol); 5404Assert.Equal(compilation.GetSpecialType(SpecialType.System_Int64), model.GetSymbolInfo(crefSyntaxes[1]).Symbol); 5720Assert.Equal(SpecialType.System_Decimal, symbol.ContainingType.SpecialType); 5918var expectedSymbol = compilation.GetSpecialType(SpecialType.System_String). 6215Assert.Equal(compilation.GetSpecialType(SpecialType.System_Int32), info.Symbol); 6248Assert.Equal(compilation.GetSpecialType(SpecialType.System_Int32), info.Symbol);
Symbols\AccessorOverriddenOrHiddenMembersTests.cs (1)
1053var disposeMethod = (IMethodSymbol)compilation.GetSpecialType(SpecialType.System_IDisposable).GetMembers("Dispose").Single();
Symbols\AnonymousTypesSymbolTests.cs (2)
1925ImmutableArray.Create<ITypeSymbol>(compilation.GetSpecialType(SpecialType.System_Int32).GetPublicSymbol(), compilation.GetSpecialType(SpecialType.System_Boolean).GetPublicSymbol()),
Symbols\AssemblyAndNamespaceTests.cs (3)
381var objectType = comp.GetSpecialType(SpecialType.System_Object); 385Assert.Equal(objectType, comp.Assembly.GetSpecialType(SpecialType.System_Object)); 386Assert.Equal(objectType, comp.Assembly.CorLibrary.GetSpecialType(SpecialType.System_Object));
Symbols\CompilationCreationTests.cs (10)
76Assert.Equal(SpecialType.None, c107.SpecialType); 78for (int i = 1; i <= (int)SpecialType.Count; i++) 80NamedTypeSymbol type = c1.GetSpecialType((SpecialType)i); 81if (i is (int)SpecialType.System_Runtime_CompilerServices_RuntimeFeature or 82(int)SpecialType.System_Runtime_CompilerServices_PreserveBaseOverridesAttribute or 83(int)SpecialType.System_Runtime_CompilerServices_InlineArrayAttribute) 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\ConversionTests.cs (4)
351Assert.Equal(ConversionKind.Identity, tuple.Item2.ClassifyConversion(tuple.Item1, comp.GetSpecialType(SpecialType.System_Boolean)).Kind); 2063var destinationType = comp.GlobalNamespace.GetMember<INamedTypeSymbol>("C").Construct(comp.GetSpecialType(SpecialType.System_Int32)); 2147Assert.Equal(SpecialType.System_Byte, method.Parameters.Single().Type.SpecialType); 2181Assert.Equal(SpecialType.System_Byte, method.Parameters.Single().Type.SpecialType);
Symbols\CorLibrary\Choosing.cs (3)
41var obj = corLib.GetSpecialType(SpecialType.System_Object); 52Assert.Same(obj, consumer.GetSpecialType(SpecialType.System_Object)); 73Assert.True(consumer.GetSpecialType(SpecialType.System_Object).IsErrorType());
Symbols\CorLibrary\CorTypes.cs (28)
34for (int i = 1; i <= (int)SpecialType.Count; i++) 36var t = noMsCorLibRef.GetSpecialType((SpecialType)i); 37Assert.Equal((SpecialType)i, t.SpecialType); 48Assert.Equal(SpecialType.System_Int32, p.SpecialType); 60(int)SpecialType.System_Runtime_CompilerServices_InlineArrayAttribute 63for (int i = 1; i <= (int)SpecialType.Count; i++) 65var t = msCorLibRef.GetSpecialType((SpecialType)i); 66Assert.Equal((SpecialType)i, t.SpecialType); 83Assert.Equal(SpecialType.None, t.SpecialType); 119else if (((NamedTypeSymbol)m).SpecialType != SpecialType.None) 124if (count >= (int)SpecialType.Count) 131Assert.Equal((int)SpecialType.Count, count + knownMissingTypes.Count); 142for (int i = 1; i <= (int)SpecialType.Count; i++) 145var t = msCorLibRef.GetSpecialType((SpecialType)i); 146Assert.Equal((SpecialType)i, t.SpecialType); 149if (t.SpecialType == SpecialType.System_Object) 165Assert.Equal(SpecialType.None, t.SpecialType); 193for (int i = 1; i <= (int)SpecialType.Count; i++) 195if (i != (int)SpecialType.System_Object) 198var t = c1.GetSpecialType((SpecialType)i); 199Assert.Equal((SpecialType)i, t.SpecialType); 211Assert.Equal(SpecialType.None, t.SpecialType); 221Assert.Equal(SpecialType.System_Object, system_object.SpecialType); 222Assert.Equal((ExtendedSpecialType)SpecialType.System_Object, system_object.ExtendedSpecialType); 226Assert.Same(system_object, c1.GetSpecialType(SpecialType.System_Object)); 228Assert.Throws<ArgumentOutOfRangeException>(() => c1.GetSpecialType(SpecialType.None)); 229Assert.Throws<ArgumentOutOfRangeException>(() => ((Compilation)c1).GetSpecialType(SpecialType.None)); 231Assert.Throws<ArgumentOutOfRangeException>(() => ((Compilation)c1).GetSpecialType(SpecialType.Count + 1));
Symbols\DefaultInterfaceImplementationTests.cs (21)
34842var test1i1 = i1.Construct(m.ContainingAssembly.GetSpecialType(SpecialType.System_Int32)); 34843var test1i1m1 = i1.Construct(m.ContainingAssembly.GetSpecialType(SpecialType.System_Int32)).GetMember<MethodSymbol>("M1"); 34844var test1i1m2 = i1.Construct(m.ContainingAssembly.GetSpecialType(SpecialType.System_Int32)).GetMember<MethodSymbol>("M2"); 34846var test2i1 = i1.Construct(m.ContainingAssembly.GetSpecialType(SpecialType.System_Int64)); 34847var test2i1m1 = i1.Construct(m.ContainingAssembly.GetSpecialType(SpecialType.System_Int64)).GetMember<MethodSymbol>("M1"); 34848var test2i1m2 = i1.Construct(m.ContainingAssembly.GetSpecialType(SpecialType.System_Int64)).GetMember<MethodSymbol>("M2"); 34849var test2i2 = i2.Construct(m.ContainingAssembly.GetSpecialType(SpecialType.System_Int64)); 34850var test2i2m1 = i2.Construct(m.ContainingAssembly.GetSpecialType(SpecialType.System_Int64)).GetMember<MethodSymbol>("I1<T>.M1"); 34851var test2i2m2 = i2.Construct(m.ContainingAssembly.GetSpecialType(SpecialType.System_Int64)).GetMember<MethodSymbol>("I1<T>.M2"); 39139var test1i1 = i1.Construct(m.ContainingAssembly.GetSpecialType(SpecialType.System_Int32)); 39140var test1i1m1 = GetSingleProperty(i1.Construct(m.ContainingAssembly.GetSpecialType(SpecialType.System_Int32))); 39142var test2i1 = i1.Construct(m.ContainingAssembly.GetSpecialType(SpecialType.System_Int64)); 39143var test2i1m1 = GetSingleProperty(i1.Construct(m.ContainingAssembly.GetSpecialType(SpecialType.System_Int64))); 39144var test2i2 = i2.Construct(m.ContainingAssembly.GetSpecialType(SpecialType.System_Int64)); 39145var test2i2m1 = GetSingleProperty(i2.Construct(m.ContainingAssembly.GetSpecialType(SpecialType.System_Int64))); 41815var test1i1 = i1.Construct(m.ContainingAssembly.GetSpecialType(SpecialType.System_Int32)); 41816var test1i1m1 = GetSingleEvent(i1.Construct(m.ContainingAssembly.GetSpecialType(SpecialType.System_Int32))); 41818var test2i1 = i1.Construct(m.ContainingAssembly.GetSpecialType(SpecialType.System_Int64)); 41819var test2i1m1 = GetSingleEvent(i1.Construct(m.ContainingAssembly.GetSpecialType(SpecialType.System_Int64))); 41820var test2i2 = i2.Construct(m.ContainingAssembly.GetSpecialType(SpecialType.System_Int64)); 41821var test2i2m1 = GetSingleEvent(i2.Construct(m.ContainingAssembly.GetSpecialType(SpecialType.System_Int64)));
Symbols\ExtensionMethodTests.cs (14)
43Assert.Equal(SpecialType.System_Object, parameter.Type.SpecialType); 49Assert.Equal(SpecialType.System_Object, parameter.Type.SpecialType); 2526var intType = compilation.GetSpecialType(SpecialType.System_Int32); 2527var stringType = compilation.GetSpecialType(SpecialType.System_String); 2597Assert.Equal(SpecialType.System_Object, method.Parameters.Single().Type.SpecialType); 2805var int32Type = compilation.GetSpecialType(SpecialType.System_Int32); 2849var int32Type = compilation2.GetSpecialType(SpecialType.System_Int32); 2872int32Type = compilation2.GetSpecialType(SpecialType.System_Int32); 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); 4094var systemVoidType = compilation.GetSpecialType(SpecialType.System_Void); 4095Assert.Equal(SpecialType.System_Void, systemVoidType.SpecialType);
Symbols\FunctionPointerTypeSymbolTests.cs (21)
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); 1531var @string = comp.GetSpecialType(SpecialType.System_String); 1554var @string = comp.GetSpecialType(SpecialType.System_String); 1582var @string = comp.GetSpecialType(SpecialType.System_String); 1598var @string = comp.GetSpecialType(SpecialType.System_String); 1599var @void = comp.GetSpecialType(SpecialType.System_Void); 1617var @string = comp.GetSpecialType(SpecialType.System_String); 1638var @string = comp.GetSpecialType(SpecialType.System_String); 1650var @string = comp.GetSpecialType(SpecialType.System_String); 1961var returnType = mainComp.GetSpecialType(SpecialType.System_String).GetPublicSymbol(); 1981var returnType = comp.GetSpecialType(SpecialType.System_String); 1983var objectMod = CSharpCustomModifier.CreateOptional(comp.GetSpecialType(SpecialType.System_Object)); 2086var returnType = comp.GetSpecialType(SpecialType.System_String); 2137var returnType = comp.GetSpecialType(SpecialType.System_String); 2139var objectMod = CSharpCustomModifier.CreateOptional(comp.GetSpecialType(SpecialType.System_Object));
Symbols\GenericConstraintTests.cs (1)
6600Assert.Equal(SpecialType.System_ValueType, typeSymbol.SpecialType);
Symbols\IndexerTests.cs (27)
58CheckIndexer(type.Indexers.Single(), true, true, SpecialType.System_String, SpecialType.System_String); 61CheckIndexer(type.Indexers.Single(), false, true, SpecialType.System_Object, SpecialType.System_Int32, SpecialType.None); 64CheckIndexer(type.Indexers.Single(), true, false, SpecialType.System_Object, SpecialType.System_String); 132CheckIndexer(type.Indexers.Single(), true, true, SpecialType.System_Object, SpecialType.System_String); 135CheckIndexer(type.Indexers.Single(), true, false, SpecialType.System_Object, SpecialType.System_String); 138CheckIndexer(type.Indexers.Single(), true, true, SpecialType.System_Object, SpecialType.System_String); 143CheckIndexer(typeAProperties[0], true, true, SpecialType.System_Object, SpecialType.System_String); 144CheckIndexer(typeAProperties[1], true, false, SpecialType.System_Object, SpecialType.System_String); 145CheckIndexer(typeAProperties[2], true, true, SpecialType.System_Object, SpecialType.System_String); 148CheckIndexer(sourceType.Indexers.Single(), true, true, SpecialType.System_Object, SpecialType.System_String); 159CheckIndexer(sourceType.Indexers.Single(), true, true, SpecialType.System_Object, SpecialType.System_String); 176private static void CheckIndexer(PropertySymbol property, bool hasGet, bool hasSet, SpecialType expectedType, params SpecialType[] expectedParameterTypes) 212private static void CheckParameters(ImmutableArray<ParameterSymbol> parameters, SpecialType[] expectedTypes) 2870var substitutedType = unsubstitutedType.Construct(comp.GetSpecialType(SpecialType.System_Int32));
Symbols\InterfaceImplementationTests.cs (1)
1864Assert.Equal(SpecialType.System_Void, returnType.SpecialType);
Symbols\Metadata\PE\BaseTypeResolution.cs (2)
313Assert.Equal("System.Object", ((SourceModuleSymbol)c1.Assembly.Modules[0]).GetCorLibType(SpecialType.System_Object).ToTestDisplayString()); 318Assert.Equal("System.Object[missing]", ((SourceModuleSymbol)c2.Assembly.Modules[0]).GetCorLibType(SpecialType.System_Object).ToTestDisplayString());
Symbols\Metadata\PE\DynamicTransformsTests.cs (4)
47_objectType = _assembly.CorLibrary.GetSpecialType(SpecialType.System_Object); 48_intType = _assembly.CorLibrary.GetSpecialType(SpecialType.System_Int32); 318Assert.Equal(SpecialType.System_Void, prop2.SetMethod.ReturnType.SpecialType); 373var nullableStruct = _assembly.CorLibrary.GetSpecialType(SpecialType.System_Nullable_T).Construct(structType);
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 (2)
65Assert.Same(((PEModuleSymbol)module2).GetCorLibType(SpecialType.System_Int32), f2.Type); 152Assert.Equal(SpecialType.None, readOnlySpanType.SpecialType);
Symbols\Metadata\PE\LoadingIndexers.cs (1)
1086Assert.Equal(SpecialType.System_Void, accessor.ReturnType.SpecialType);
Symbols\Metadata\PE\MissingTypeReferences.cs (4)
319Assert.Equal(asm1.GetSpecialType(SpecialType.System_Boolean), asm1.GetSpecialType(SpecialType.System_Boolean)); 320Assert.Equal(asm1.GetSpecialType(SpecialType.System_Boolean), asm2.GetSpecialType(SpecialType.System_Boolean));
Symbols\MissingSpecialMember.cs (12)
157var specialType = comp.GetSpecialType(SpecialType.System_String); 159Assert.Equal(SpecialType.System_String, specialType.SpecialType); 164Assert.Equal(SpecialType.None, lookupType.SpecialType); 235var specialType = comp.GetSpecialType(SpecialType.System_Nullable_T); 237Assert.Equal(SpecialType.System_Nullable_T, specialType.SpecialType); 241Assert.Equal(SpecialType.System_Nullable_T, lookupType.SpecialType); 528for (var special = SpecialType.None + 1; special <= SpecialType.Count; special++) 533if (special is SpecialType.System_Runtime_CompilerServices_RuntimeFeature or 534SpecialType.System_Runtime_CompilerServices_PreserveBaseOverridesAttribute or 535SpecialType.System_Runtime_CompilerServices_InlineArrayAttribute)
Symbols\OverriddenOrHiddenMembersTests.cs (1)
2867var obj = compilation.GetSpecialType(SpecialType.System_Object);
Symbols\PartialPropertiesTests.cs (1)
5283var intSymbol = comp.GetSpecialType(SpecialType.System_Int32);
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\BaseClassTests.cs (2)
2034Assert.Equal(SpecialType.System_Int32, typeInfo.Type.SpecialType); 2035Assert.Equal(SpecialType.System_Int64, typeInfo.ConvertedType.SpecialType);
Symbols\Source\ClsComplianceTests.cs (15)
3156var intType = helper.GetSpecialType(SpecialType.System_Int32); 3158foreach (SpecialType st in Enum.GetValues(typeof(SpecialType))) 3162case SpecialType.None: 3163case SpecialType.System_Void: 3164case SpecialType.System_Runtime_CompilerServices_IsVolatile: // static 3165case SpecialType.System_Runtime_CompilerServices_RuntimeFeature: // static and not available 3166case SpecialType.System_Runtime_CompilerServices_PreserveBaseOverridesAttribute: // not available 3167case SpecialType.System_Runtime_CompilerServices_InlineArrayAttribute: // not available 3183case SpecialType.System_SByte: 3184case SpecialType.System_UInt16: 3185case SpecialType.System_UInt32: 3186case SpecialType.System_UInt64: 3187case SpecialType.System_UIntPtr: 3188case SpecialType.System_TypedReference:
Symbols\Source\CustomModifierCopyTests.cs (23)
811var baseIndexer1 = (PropertySymbol)baseClass.GetMembers().Where(IsPropertyWithSingleParameter(SpecialType.System_Int32, isArrayType: true)).Single(); 812var baseIndexer2 = (PropertySymbol)baseClass.GetMembers().Where(IsPropertyWithSingleParameter(SpecialType.System_Int64, isArrayType: true)).Single(); 815var derivedIndexer1 = (PropertySymbol)derivedClass.GetMembers().Where(IsPropertyWithSingleParameter(SpecialType.System_Int32, isArrayType: true)).Single(); 816var derivedIndexer2 = (PropertySymbol)derivedClass.GetMembers().Where(IsPropertyWithSingleParameter(SpecialType.System_Int64, isArrayType: true)).Single(); 819var derived2Indexer1 = (PropertySymbol)derived2Class.GetMembers().Where(IsPropertyWithSingleParameter(SpecialType.System_Int32, isArrayType: true)).Single(); 820var derived2Indexer2 = (PropertySymbol)derived2Class.GetMembers().Where(IsPropertyWithSingleParameter(SpecialType.System_Int64, isArrayType: true)).Single(); 921Assert.Equal(SpecialType.System_Object, interfaceMethod.ParameterTypesWithAnnotations.Single().SpecialType); 966Assert.Equal(SpecialType.System_Object, classMethod.ParameterTypesWithAnnotations.Single().SpecialType); 1403Assert.Equal(SpecialType.System_Object, classMethod.ReturnType.SpecialType); 1442Assert.Equal(SpecialType.System_Object, interfaceMethod.ReturnType.SpecialType); 1781var int8Type = comp.GetSpecialType(SpecialType.System_SByte); 1782var int16Type = comp.GetSpecialType(SpecialType.System_Int16); 1783var int32Type = comp.GetSpecialType(SpecialType.System_Int32); 1784var int64Type = comp.GetSpecialType(SpecialType.System_Int64); 1898var int8Type = comp.GetSpecialType(SpecialType.System_SByte); 1899var int16Type = comp.GetSpecialType(SpecialType.System_Int16); 1995var int8Type = comp.GetSpecialType(SpecialType.System_SByte); 1996var int16Type = comp.GetSpecialType(SpecialType.System_Int16); 1997var int32Type = comp.GetSpecialType(SpecialType.System_Int32); 1998var int64Type = comp.GetSpecialType(SpecialType.System_Int64); 2097var int8Type = comp.GetSpecialType(SpecialType.System_SByte); 2098var int16Type = comp.GetSpecialType(SpecialType.System_Int16); 2122private static Func<Symbol, bool> IsPropertyWithSingleParameter(SpecialType paramSpecialType, bool isArrayType = false)
Symbols\Source\DelegateTests.cs (4)
115Assert.Equal(comp.GetSpecialType(SpecialType.System_Object), ctor.Parameters[0].Type); 116Assert.Equal(comp.GetSpecialType(SpecialType.System_IntPtr), ctor.Parameters[1].Type); 171Assert.Equal(SpecialType.System_AsyncCallback, lastParameterType.SpecialType); 187Assert.Equal(SpecialType.System_IAsyncResult, lastParameterType.SpecialType);
Symbols\Source\EnumTests.cs (11)
81VerifyEnumsValue(comp, "Suits", SpecialType.System_Byte, null, (byte)2, null); 98VerifyEnumsValue(comp, "Suits", SpecialType.System_Int16, (short)0, (short)1, (short)2, null, null, null); 694VerifyEnumsValue(comp, "c1.COLORS", SpecialType.System_UInt32, 0u, 1u, 2u); 713VerifyEnumsValue(comp, "Figure", SpecialType.System_Int32, 0, 1, 2); 724VerifyEnumsValue(comp, "Figure", SpecialType.System_Int16, (short)0, (short)1, (short)2); 733VerifyEnumsValue(comp, "Figure", SpecialType.System_Int32, 0, 1, 2); 986Assert.Equal(SpecialType.System_Int32, type.SpecialType); 993var specialType = SpecialType.System_Int32; 998specialType = SpecialType.System_Int64; 1003private List<Symbol> VerifyEnumsValue(CSharpCompilation comp, string enumName, SpecialType underlyingType, params object[] expectedEnumValues)
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\ModifierTests.cs (1)
152var intType = comp.GetSpecialType(SpecialType.System_Int32);
Symbols\Source\NullablePublicAPITests.cs (5)
2637Assert.Equal(SpecialType.System_String, symbol.Type.SpecialType); 4215Assert.Equal(SpecialType.System_String, ((IFieldSymbol)symbolInfo.Symbol).Type.SpecialType); 4245Assert.Equal(SpecialType.System_String, symbolInfo.Type.SpecialType); 5197Assert.Equal(SpecialType.System_String, typeInfo.Type.SpecialType); 5232Assert.Equal(SpecialType.System_String, typeInfo.Type.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 (7)
117Assert.Equal(SpecialType.System_Int32, neti.TypeArguments()[0].SpecialType); 137var _int = compilation.GetSpecialType(SpecialType.System_Int32); 138var _byte = compilation.GetSpecialType(SpecialType.System_Byte); 139var _char = compilation.GetSpecialType(SpecialType.System_Char); 179var _int = compilation.GetSpecialType(SpecialType.System_Int32); 180var _byte = compilation.GetSpecialType(SpecialType.System_Byte); 181var _char = compilation.GetSpecialType(SpecialType.System_Char);
Symbols\Source\UsingAliasTests.cs (2)
106Assert.Equal(SpecialType.System_Object, usingAliasType.SpecialType); 221Assert.Equal(SpecialType.System_Object, usingAliasType.SpecialType);
Symbols\SymbolDistinguisherTests.cs (2)
315var errorType = dummyComp.GetSpecialType(SpecialType.System_Int32); 316var validType = CreateEmptyCompilation("", new[] { MscorlibRef }).GetSpecialType(SpecialType.System_Int32);
Symbols\TypedConstantTests.cs (7)
34_arrayType = _compilation.CreateArrayTypeSymbol(_compilation.GetSpecialType(SpecialType.System_Object)); 35_intType = _compilation.GetSpecialType(SpecialType.System_Int32); 36_stringType = _compilation.GetSpecialType(SpecialType.System_String); 37_enumString1 = _compilation.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T).Construct(_compilation.GetSpecialType(SpecialType.System_String)); 38_enumString2 = _compilation.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T).Construct(_compilation.GetSpecialType(SpecialType.System_String));
Symbols\TypeResolutionTests.cs (1)
127Assert.Equal(SpecialType.System_Int32, intSym.SpecialType);
Symbols\TypeTests.cs (26)
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); 1481Assert.Same(comp.GetSpecialType(SpecialType.System_Nullable_T), varX.Type.OriginalDefinition); 1508Assert.Same(comp.GetSpecialType(SpecialType.System_Nullable_T), memType.OriginalDefinition); 1513Assert.Same(comp.GetSpecialType(SpecialType.System_SByte), underType); 1521Assert.Same(comp.GetSpecialType(SpecialType.System_Byte), underType); 1526Assert.Same(comp.GetSpecialType(SpecialType.System_Nullable_T), memType.OriginalDefinition); 1530Assert.Same(comp.GetSpecialType(SpecialType.System_Char), underType); 1540Assert.Same(comp.GetSpecialType(SpecialType.System_Int16), underType); 1545Assert.Same(comp.GetSpecialType(SpecialType.System_UInt16), memType.GetNullableUnderlyingType()); 1547Assert.Same(comp.GetSpecialType(SpecialType.System_UInt32), memType.GetNullableUnderlyingType()); 1551Assert.Same(comp.GetSpecialType(SpecialType.System_Nullable_T), memType.OriginalDefinition); 1554Assert.Same(comp.GetSpecialType(SpecialType.System_Int32), underType); 1561Assert.Same(comp.GetSpecialType(SpecialType.System_Int64), memType.GetNullableUnderlyingType()); 1563Assert.Same(comp.GetSpecialType(SpecialType.System_UInt64), memType.GetNullableUnderlyingType()); 1570Assert.Same(comp.GetSpecialType(SpecialType.System_Decimal), underType); 1579Assert.Same(comp.GetSpecialType(SpecialType.System_Double), memType.GetNullableUnderlyingType()); 1582Assert.Same(comp.GetSpecialType(SpecialType.System_Single), (memType as ArrayTypeSymbol).ElementType.GetNullableUnderlyingType()); 1619Assert.Same(comp.GetSpecialType(SpecialType.System_Nullable_T), memType.OriginalDefinition); 1644Assert.Same(comp.GetSpecialType(SpecialType.System_Nullable_T), memType.OriginalDefinition); 1691Assert.Same(comp.GetSpecialType(SpecialType.System_Nullable_T), memType.OriginalDefinition); 1707Assert.Same(comp.GetSpecialType(SpecialType.System_Nullable_T), memType.OriginalDefinition); 1769Assert.Same(comp.GetSpecialType(SpecialType.System_Nullable_T), memType.OriginalDefinition); 1785Assert.Same(comp.GetSpecialType(SpecialType.System_Decimal), ((ITypeSymbol)tinfo.ConvertedType).GetNullableUnderlyingType());
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Diagnostics\DiagnosticTest.cs (1)
113var type = TypeWithAnnotations.Create(comp.GetSpecialType(SpecialType.System_Object));
Microsoft.CodeAnalysis.CSharp.Test.Utilities (4)
Extensions.cs (2)
577Assert.Equal(SpecialType.System_Void, accessor.ReturnType.SpecialType); 587Assert.Equal(SpecialType.System_Void, accessor.ReturnType.SpecialType);
FunctionPointerUtilities.cs (1)
334public static Action<TypeSymbol> IsSpecialType(SpecialType specialType)
MetadataTestHelpers.cs (1)
16internal static NamedTypeSymbol GetCorLibType(this ModuleSymbol module, SpecialType typeId)
Microsoft.CodeAnalysis.CSharp.WinRT.UnitTests (3)
CodeGen\WinMdEventTests.cs (1)
673Assert.Equal(SpecialType.System_Void, type.Type.SpecialType);
Metadata\WinMdEventTests.cs (2)
3576var voidType = compilation.GetSpecialType(SpecialType.System_Void); 3607var voidType = compilation.GetSpecialType(SpecialType.System_Void);
Microsoft.CodeAnalysis.CSharp.Workspaces (247)
CodeGeneration\CSharpSyntaxGenerator.cs (17)
3503public override SyntaxNode TypeExpression(SpecialType specialType) 3506SpecialType.System_Boolean => BoolKeyword, 3507SpecialType.System_Byte => ByteKeyword, 3508SpecialType.System_Char => CharKeyword, 3509SpecialType.System_Decimal => DecimalKeyword, 3510SpecialType.System_Double => DoubleKeyword, 3511SpecialType.System_Int16 => ShortKeyword, 3512SpecialType.System_Int32 => IntKeyword, 3513SpecialType.System_Int64 => LongKeyword, 3514SpecialType.System_Object => ObjectKeyword, 3515SpecialType.System_SByte => SByteKeyword, 3516SpecialType.System_Single => FloatKeyword, 3517SpecialType.System_String => StringKeyword, 3518SpecialType.System_UInt16 => UShortKeyword, 3519SpecialType.System_UInt32 => UIntKeyword, 3520SpecialType.System_UInt64 => ULongKeyword, 3521SpecialType.System_Void => VoidKeyword,
Recommendations\CSharpRecommendationServiceRunner.cs (2)
881symbol.ContainingType.SpecialType is SpecialType.System_Object or SpecialType.System_ValueType)
Recommendations\CSharpRecommendationServiceRunner_Conversions.cs (109)
20private static readonly ImmutableArray<SpecialType> s_predefinedEnumConversionTargets = 22SpecialType.System_Byte, 23SpecialType.System_Char, 24SpecialType.System_Decimal, 25SpecialType.System_Double, 26SpecialType.System_Single, 27SpecialType.System_Int32, 28SpecialType.System_Int64, 29SpecialType.System_SByte, 30SpecialType.System_Int16, 31SpecialType.System_UInt32, 32SpecialType.System_UInt64, 33SpecialType.System_UInt16, 36private static readonly ImmutableArray<SpecialType> s_sbyteConversions = 38SpecialType.System_Byte, 39SpecialType.System_Char, 40SpecialType.System_UInt32, 41SpecialType.System_UInt64, 42SpecialType.System_UInt16, 45private static readonly ImmutableArray<SpecialType> s_byteConversions = [SpecialType.System_Char, SpecialType.System_SByte]; 47private static readonly ImmutableArray<SpecialType> s_int16Conversions = 49SpecialType.System_Byte, 50SpecialType.System_Char, 51SpecialType.System_UInt32, 52SpecialType.System_UInt64, 53SpecialType.System_UInt16, 54SpecialType.System_SByte, 57private static readonly ImmutableArray<SpecialType> s_uint16Conversions = [SpecialType.System_Byte, SpecialType.System_Char, SpecialType.System_SByte, SpecialType.System_Int16]; 59private static readonly ImmutableArray<SpecialType> s_int32Conversions = 61SpecialType.System_Byte, 62SpecialType.System_Char, 63SpecialType.System_SByte, 64SpecialType.System_Int16, 65SpecialType.System_UInt32, 66SpecialType.System_UInt16, 67SpecialType.System_UInt64, 70private static readonly ImmutableArray<SpecialType> s_uint32Conversions = 72SpecialType.System_Byte, 73SpecialType.System_Char, 74SpecialType.System_Int32, 75SpecialType.System_SByte, 76SpecialType.System_Int16, 77SpecialType.System_UInt16, 80private static readonly ImmutableArray<SpecialType> s_int64Conversions = 82SpecialType.System_Byte, 83SpecialType.System_Char, 84SpecialType.System_Int32, 85SpecialType.System_UInt32, 86SpecialType.System_UInt64, 87SpecialType.System_UInt16, 88SpecialType.System_SByte, 89SpecialType.System_Int16, 92private static readonly ImmutableArray<SpecialType> s_uint64Conversions = 94SpecialType.System_Byte, 95SpecialType.System_Char, 96SpecialType.System_Int32, 97SpecialType.System_Int64, 98SpecialType.System_UInt32, 99SpecialType.System_UInt16, 100SpecialType.System_SByte, 101SpecialType.System_Int16, 104private static readonly ImmutableArray<SpecialType> s_charConversions = [SpecialType.System_Byte, SpecialType.System_SByte, SpecialType.System_Int16]; 106private static readonly ImmutableArray<SpecialType> s_singleConversions = 108SpecialType.System_Byte, 109SpecialType.System_Char, 110SpecialType.System_Decimal, 111SpecialType.System_Int32, 112SpecialType.System_Int64, 113SpecialType.System_UInt32, 114SpecialType.System_UInt64, 115SpecialType.System_UInt16, 116SpecialType.System_SByte, 117SpecialType.System_Int16, 120private static readonly ImmutableArray<SpecialType> s_doubleConversions = 122SpecialType.System_Byte, 123SpecialType.System_Char, 124SpecialType.System_Decimal, 125SpecialType.System_Single, 126SpecialType.System_Int32, 127SpecialType.System_Int64, 128SpecialType.System_UInt32, 129SpecialType.System_UInt64, 130SpecialType.System_UInt16, 131SpecialType.System_SByte, 132SpecialType.System_Int16, 148? compilation.GetSpecialType(SpecialType.System_Nullable_T).Construct(container) 210public static ImmutableArray<SpecialType>? GetPredefinedNumericConversions(ITypeSymbol container) 213SpecialType.System_SByte => s_sbyteConversions, 214SpecialType.System_Byte => s_byteConversions, 215SpecialType.System_Int16 => s_int16Conversions, 216SpecialType.System_UInt16 => s_uint16Conversions, 217SpecialType.System_Int32 => s_int32Conversions, 218SpecialType.System_UInt32 => s_uint32Conversions, 219SpecialType.System_Int64 => s_int64Conversions, 220SpecialType.System_UInt64 => s_uint64Conversions, 221SpecialType.System_Char => s_charConversions, 222SpecialType.System_Single => s_singleConversions, 223SpecialType.System_Double => s_doubleConversions, 229ITypeSymbol container, INamedTypeSymbol containerWithoutNullable, ArrayBuilder<ISymbol> symbols, ImmutableArray<SpecialType> specialTypes) 233foreach (var specialType in specialTypes)
Recommendations\CSharpRecommendationServiceRunner_Operators.cs (3)
55=> container.IsSpecialType() || container.SpecialType is SpecialType.System_IntPtr or SpecialType.System_UIntPtr; 96return symbol.Parameters.Length == 2 && symbol.ReturnType.SpecialType == SpecialType.System_Boolean;
Rename\CSharpRenameRewriterLanguageService.cs (1)
1029if (!method.ReturnsVoid && !method.Parameters.Any() && method.ReturnType.SpecialType == SpecialType.System_Boolean)
Simplification\Simplifiers\AbstractCSharpSimplifier.cs (23)
33/// Returns the predefined keyword kind for a given <see cref="SpecialType"/>. 35/// <param name="specialType">The <see cref="SpecialType"/> of this type.</param> 37protected static SyntaxToken? TryGetPredefinedKeywordToken(SemanticModel semanticModel, SpecialType specialType) 41SpecialType.System_Boolean => SyntaxKind.BoolKeyword, 42SpecialType.System_Byte => SyntaxKind.ByteKeyword, 43SpecialType.System_SByte => SyntaxKind.SByteKeyword, 44SpecialType.System_Int32 => SyntaxKind.IntKeyword, 45SpecialType.System_UInt32 => SyntaxKind.UIntKeyword, 46SpecialType.System_Int16 => SyntaxKind.ShortKeyword, 47SpecialType.System_UInt16 => SyntaxKind.UShortKeyword, 48SpecialType.System_Int64 => SyntaxKind.LongKeyword, 49SpecialType.System_UInt64 => SyntaxKind.ULongKeyword, 50SpecialType.System_Single => SyntaxKind.FloatKeyword, 51SpecialType.System_Double => SyntaxKind.DoubleKeyword, 52SpecialType.System_Decimal => SyntaxKind.DecimalKeyword, 53SpecialType.System_String => SyntaxKind.StringKeyword, 54SpecialType.System_Char => SyntaxKind.CharKeyword, 55SpecialType.System_Object => SyntaxKind.ObjectKeyword, 56SpecialType.System_Void => SyntaxKind.VoidKeyword, 63if (specialType is SpecialType.System_IntPtr or SpecialType.System_UIntPtr && semanticModel.UnifiesNativeIntegers()) 64return SyntaxFactory.Identifier(specialType == SpecialType.System_IntPtr ? "nint" : "nuint"); 387semanticModel.GetTypeInfo(invocationExpr).Type.SpecialType == SpecialType.System_String;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ITypeSymbolExtensions.cs (13)
19case SpecialType.System_Boolean: 20case SpecialType.System_Char: 21case SpecialType.System_SByte: 22case SpecialType.System_Int16: 23case SpecialType.System_Int32: 24case SpecialType.System_Int64: 25case SpecialType.System_Byte: 26case SpecialType.System_UInt16: 27case SpecialType.System_UInt32: 28case SpecialType.System_UInt64: 29case SpecialType.System_Single: 30case SpecialType.System_Double: 33case SpecialType.System_Decimal:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (18)
96while (current is IConversionOperation { Type.SpecialType: SpecialType.System_Delegate or SpecialType.System_MulticastDelegate }) 99if (current is IConversionOperation { Type.SpecialType: SpecialType.System_Object }) 552if (castNode.IsParentKind(SyntaxKind.Interpolation) && originalConversionOperation.Type?.SpecialType is SpecialType.System_Object) 647if (originalNamedConvertedType.OriginalDefinition.SpecialType is SpecialType.System_Collections_Generic_IEnumerable_T && 648namedCastedType.OriginalDefinition.SpecialType is SpecialType.System_Collections_Generic_IReadOnlyCollection_T or SpecialType.System_Collections_Generic_IReadOnlyList_T) 654if (originalNamedConvertedType.OriginalDefinition.SpecialType is SpecialType.System_Collections_Generic_ICollection_T && 655namedCastedType.OriginalDefinition.SpecialType is SpecialType.System_Collections_Generic_IList_T) 661if (originalNamedConvertedType.OriginalDefinition.SpecialType is SpecialType.System_Collections_Generic_ICollection_T or SpecialType.System_Collections_Generic_IList_T && 726if (current.ContainingType.SpecialType == SpecialType.System_Object) 822=> type.IsSignedIntegralType() || type?.SpecialType is SpecialType.System_IntPtr; 958if (binaryOperation.LeftOperand.Type?.SpecialType == SpecialType.System_Object && 965else if (binaryOperation.RightOperand.Type?.SpecialType == SpecialType.System_Object && 1148=> type?.SpecialType is SpecialType.System_Double or SpecialType.System_Single; 1435rewrittenType.SpecialType == SpecialType.System_Enum;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpFlagsEnumGenerator.cs (1)
23SpecialType underlyingSpecialType,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ExpressionGenerator.cs (6)
124var isNotSingle = !IsSpecialType(type, SpecialType.System_Single); 135if (value is double && !IsSpecialType(type, SpecialType.System_Double)) 140if (value is uint && !IsSpecialType(type, SpecialType.System_UInt32)) 145if (value is long && !IsSpecialType(type, SpecialType.System_Int64)) 150if (value is ulong && !IsSpecialType(type, SpecialType.System_UInt64)) 159var isNotDecimal = !IsSpecialType(type, SpecialType.System_Decimal);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\NamedTypeGenerator.cs (2)
247var baseList = namedType.EnumUnderlyingType != null && namedType.EnumUnderlyingType.SpecialType != SpecialType.System_Int32 318if (namedType.TypeKind == TypeKind.Class && namedType.BaseType != null && namedType.BaseType.SpecialType != Microsoft.CodeAnalysis.SpecialType.System_Object)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ExpressionSyntaxExtensions.cs (1)
116targetType = semanticModel.Compilation.GetSpecialType(SpecialType.System_Object);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\InternalExtensions.cs (1)
33if (typeInfo.Type != null && typeInfo.Type.SpecialType == SpecialType.System_Void)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeParameterSymbolExtensions.cs (1)
65if (type.SpecialType != SpecialType.System_Object)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (2)
122syntax = IdentifierName(symbol.SpecialType == SpecialType.System_IntPtr ? "nint" : "nuint"); 226if (symbol.SpecialType == SpecialType.System_Void)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpSyntaxGeneratorInternal.cs (12)
264case SpecialType.System_Boolean: 266case SpecialType.System_SByte: 267case SpecialType.System_Byte: 268case SpecialType.System_Int16: 269case SpecialType.System_UInt16: 270case SpecialType.System_Int32: 271case SpecialType.System_UInt32: 272case SpecialType.System_Int64: 273case SpecialType.System_UInt64: 274case SpecialType.System_Decimal: 275case SpecialType.System_Single: 276case SpecialType.System_Double:
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (35)
585return CreateResult(this.Compilation.GetSpecialType(SpecialType.System_Int32)); 844return CreateResult(this.Compilation.GetSpecialType(SpecialType.System_Int32)); 968return CreateResult(this.Compilation.GetSpecialType(SpecialType.System_Int32)); 978return CreateResult(SpecialType.System_Boolean); 1033if (parentTypes.Any(static parentType => parentType.InferredType.SpecialType == SpecialType.System_String || parentType.InferredType.TypeKind == TypeKind.Delegate)) 1035return parentTypes.Where(parentType => parentType.InferredType.SpecialType == SpecialType.System_String || parentType.InferredType.TypeKind == TypeKind.Delegate); 1066return CreateResult(this.Compilation.GetSpecialType(SpecialType.System_Int32)); 1073return CreateResult(SpecialType.System_Boolean); 1106return CreateResult(SpecialType.System_Boolean); 1129return CreateResult(SpecialType.System_Object, NullableAnnotation.Annotated); 1143else if (symbol.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T) 1150return compilation.GetSpecialType(SpecialType.System_Nullable_T).Construct(symbol); 1171return CreateResult(SpecialType.System_Boolean); 1205return CreateResult(SpecialType.System_Boolean); 1244return CreateResult(SpecialType.System_Void); 1257? this.Compilation.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T) 1260enumerableType ??= this.Compilation.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T); 1268.Construct(Compilation.GetSpecialType(SpecialType.System_Object))); 1283return CreateResult(SpecialType.System_Boolean); 1292return CreateResult(SpecialType.System_Boolean); 1601return CreateResult(SpecialType.System_Object); 1897return CreateResult(this.Compilation.GetSpecialType(SpecialType.System_Int32)); 1915return CreateResult(this.Compilation.GetSpecialType(SpecialType.System_Int32)); 1922return CreateResult(this.Compilation.GetSpecialType(SpecialType.System_Int32)); 1931return CreateResult(SpecialType.System_Boolean); 1978return types.Select(t => t.InferredType.SpecialType == SpecialType.System_Void ? new TypeInferenceInfo(task) : new TypeInferenceInfo(taskOfT.Construct(t.InferredType))); 2014return this.Compilation.GetSpecialType(SpecialType.System_Void); 2142return CreateResult(this.Compilation.GetSpecialType(SpecialType.System_Int32)); 2169return CreateResult(SpecialType.System_IDisposable); 2193return CreateResult(SpecialType.System_IDisposable); 2197return CreateResult(this.Compilation.GetSpecialType(SpecialType.System_Int32)); 2200if (laterUsageInference is not [] and not [{ InferredType.SpecialType: SpecialType.System_Object }]) 2229if (inferredDescendantTypes is not [] and not [{ InferredType.SpecialType: SpecialType.System_Object }]) 2374return [new TypeInferenceInfo(Compilation.GetSpecialType(SpecialType.System_Boolean))]; 2383return CreateResult(SpecialType.System_Boolean);
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (31)
CodeGeneration\SyntaxGeneratorTests.cs (31)
277var intType = _emptyCompilation.GetSpecialType(SpecialType.System_Int32); 290VerifySyntax<TypeSyntax>(Generator.TypeExpression(SpecialType.System_Byte), "byte"); 291VerifySyntax<TypeSyntax>(Generator.TypeExpression(SpecialType.System_SByte), "sbyte"); 293VerifySyntax<TypeSyntax>(Generator.TypeExpression(SpecialType.System_Int16), "short"); 294VerifySyntax<TypeSyntax>(Generator.TypeExpression(SpecialType.System_UInt16), "ushort"); 296VerifySyntax<TypeSyntax>(Generator.TypeExpression(SpecialType.System_Int32), "int"); 297VerifySyntax<TypeSyntax>(Generator.TypeExpression(SpecialType.System_UInt32), "uint"); 299VerifySyntax<TypeSyntax>(Generator.TypeExpression(SpecialType.System_Int64), "long"); 300VerifySyntax<TypeSyntax>(Generator.TypeExpression(SpecialType.System_UInt64), "ulong"); 302VerifySyntax<TypeSyntax>(Generator.TypeExpression(SpecialType.System_Single), "float"); 303VerifySyntax<TypeSyntax>(Generator.TypeExpression(SpecialType.System_Double), "double"); 305VerifySyntax<TypeSyntax>(Generator.TypeExpression(SpecialType.System_Char), "char"); 306VerifySyntax<TypeSyntax>(Generator.TypeExpression(SpecialType.System_String), "string"); 308VerifySyntax<TypeSyntax>(Generator.TypeExpression(SpecialType.System_Object), "object"); 309VerifySyntax<TypeSyntax>(Generator.TypeExpression(SpecialType.System_Decimal), "decimal"); 315var genericType = _emptyCompilation.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T); 318var arrayType = _emptyCompilation.CreateArrayTypeSymbol(_emptyCompilation.GetSpecialType(SpecialType.System_Int32)); 405var intType = _emptyCompilation.GetSpecialType(SpecialType.System_Int32); 781Generator.FieldDeclaration("fld", Generator.TypeExpression(SpecialType.System_Int32)), 785Generator.FieldDeclaration("fld", Generator.TypeExpression(SpecialType.System_Int32), initializer: Generator.LiteralExpression(0)), 789Generator.FieldDeclaration("fld", Generator.TypeExpression(SpecialType.System_Int32), accessibility: Accessibility.Public), 793Generator.FieldDeclaration("fld", Generator.TypeExpression(SpecialType.System_Int32), accessibility: Accessibility.NotApplicable, modifiers: DeclarationModifiers.Static | DeclarationModifiers.ReadOnly), 797Generator.FieldDeclaration("fld", Generator.TypeExpression(SpecialType.System_Int32), accessibility: Accessibility.NotApplicable, modifiers: DeclarationModifiers.Required), 854_emptyCompilation.GetSpecialType(SpecialType.System_Int32), 855_emptyCompilation.GetSpecialType(SpecialType.System_String) 858var returnType = Generator.TypeExpression(SpecialType.System_Boolean); 974var returnType = Generator.TypeExpression(SpecialType.System_Void); 986_emptyCompilation.GetSpecialType(SpecialType.System_Int32) 1060var doubleType = _emptyCompilation.GetSpecialType(SpecialType.System_Decimal); 1062m.Name == WellKnownMemberNames.ImplicitConversionName && m.Parameters[0].Type.Equals(_emptyCompilation.GetSpecialType(SpecialType.System_Byte))); 2653var field = _emptyCompilation.GetSpecialType(SpecialType.System_UInt32).GetMembers(nameof(UInt32.MaxValue)).Single();
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (2)
CodeGeneration\CodeGenerationTests.cs (2)
512SpecialType specialType = SpecialType.None,
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (19)
PDB\PdbHelpers.cs (19)
89(SpecialType.System_Boolean, short shortVal) => ConstantValue.Create(shortVal != 0), 90(SpecialType.System_Byte, short shortVal) when unchecked((byte)shortVal) == shortVal => ConstantValue.Create((byte)shortVal), 91(SpecialType.System_SByte, short shortVal) when unchecked((sbyte)shortVal) == shortVal => ConstantValue.Create((sbyte)shortVal), 92(SpecialType.System_Int16, short shortVal) => ConstantValue.Create(shortVal), 93(SpecialType.System_Char, ushort ushortVal) => ConstantValue.Create((char)ushortVal), 94(SpecialType.System_UInt16, ushort ushortVal) => ConstantValue.Create(ushortVal), 95(SpecialType.System_Int32, int intVal) => ConstantValue.Create(intVal), 96(SpecialType.System_UInt32, uint uintVal) => ConstantValue.Create(uintVal), 97(SpecialType.System_Int64, long longVal) => ConstantValue.Create(longVal), 98(SpecialType.System_UInt64, ulong ulongVal) => ConstantValue.Create(ulongVal), 99(SpecialType.System_Single, float floatVal) => ConstantValue.Create(floatVal), 100(SpecialType.System_Double, double doubleVal) => ConstantValue.Create(doubleVal), 101(SpecialType.System_String, 0) => ConstantValue.Null, 102(SpecialType.System_String, null) => ConstantValue.Create(string.Empty), 103(SpecialType.System_String, string str) => ConstantValue.Create(str), 104(SpecialType.System_Object, 0) => ConstantValue.Null, 105(SpecialType.System_Decimal, decimal decimalValue) => ConstantValue.Create(decimalValue), 106(SpecialType.System_DateTime, double doubleVal) => ConstantValue.Create(DateTimeUtilities.ToDateTime(doubleVal)), 107(SpecialType.None, 0) when type.IsReferenceType => ConstantValue.Null,
Microsoft.CodeAnalysis.Extensions.Package (259)
src\Compilers\Core\Portable\SpecialTypeExtensions.cs (154)
17public static bool IsClrInteger(this SpecialType specialType) 21case SpecialType.System_Boolean: 22case SpecialType.System_Char: 23case SpecialType.System_Byte: 24case SpecialType.System_SByte: 25case SpecialType.System_Int16: 26case SpecialType.System_UInt16: 27case SpecialType.System_Int32: 28case SpecialType.System_UInt32: 29case SpecialType.System_Int64: 30case SpecialType.System_UInt64: 31case SpecialType.System_IntPtr: 32case SpecialType.System_UIntPtr: 42public static bool IsBlittable(this SpecialType specialType) 46case SpecialType.System_Boolean: 47case SpecialType.System_Char: 48case SpecialType.System_Byte: 49case SpecialType.System_SByte: 50case SpecialType.System_Int16: 51case SpecialType.System_UInt16: 52case SpecialType.System_Int32: 53case SpecialType.System_UInt32: 54case SpecialType.System_Int64: 55case SpecialType.System_UInt64: 56case SpecialType.System_Single: 57case SpecialType.System_Double: 64public static bool IsValueType(this SpecialType specialType) 68case SpecialType.System_Void: 69case SpecialType.System_Boolean: 70case SpecialType.System_Char: 71case SpecialType.System_Byte: 72case SpecialType.System_SByte: 73case SpecialType.System_Int16: 74case SpecialType.System_UInt16: 75case SpecialType.System_Int32: 76case SpecialType.System_UInt32: 77case SpecialType.System_Int64: 78case SpecialType.System_UInt64: 79case SpecialType.System_Single: 80case SpecialType.System_Double: 81case SpecialType.System_Decimal: 82case SpecialType.System_IntPtr: 83case SpecialType.System_UIntPtr: 84case SpecialType.System_Nullable_T: 85case SpecialType.System_DateTime: 86case SpecialType.System_TypedReference: 87case SpecialType.System_ArgIterator: 88case SpecialType.System_RuntimeArgumentHandle: 89case SpecialType.System_RuntimeFieldHandle: 90case SpecialType.System_RuntimeMethodHandle: 91case SpecialType.System_RuntimeTypeHandle: 98public static int SizeInBytes(this SpecialType specialType) 102case SpecialType.System_SByte: 104case SpecialType.System_Byte: 106case SpecialType.System_Int16: 108case SpecialType.System_UInt16: 110case SpecialType.System_Int32: 112case SpecialType.System_UInt32: 114case SpecialType.System_Int64: 116case SpecialType.System_UInt64: 118case SpecialType.System_Char: 120case SpecialType.System_Single: 122case SpecialType.System_Double: 124case SpecialType.System_Boolean: 127case SpecialType.System_Decimal: 141public static bool IsPrimitiveRecursiveStruct(this SpecialType specialType) 145case SpecialType.System_Boolean: 146case SpecialType.System_Byte: 147case SpecialType.System_Char: 148case SpecialType.System_Double: 149case SpecialType.System_Int16: 150case SpecialType.System_Int32: 151case SpecialType.System_Int64: 152case SpecialType.System_UInt16: 153case SpecialType.System_UInt32: 154case SpecialType.System_UInt64: 155case SpecialType.System_IntPtr: 156case SpecialType.System_UIntPtr: 157case SpecialType.System_SByte: 158case SpecialType.System_Single: 165public static bool IsValidEnumUnderlyingType(this SpecialType specialType) 169case SpecialType.System_Byte: 170case SpecialType.System_SByte: 171case SpecialType.System_Int16: 172case SpecialType.System_UInt16: 173case SpecialType.System_Int32: 174case SpecialType.System_UInt32: 175case SpecialType.System_Int64: 176case SpecialType.System_UInt64: 183public static bool IsNumericType(this SpecialType specialType) 187case SpecialType.System_Byte: 188case SpecialType.System_SByte: 189case SpecialType.System_Int16: 190case SpecialType.System_UInt16: 191case SpecialType.System_Int32: 192case SpecialType.System_UInt32: 193case SpecialType.System_Int64: 194case SpecialType.System_UInt64: 195case SpecialType.System_Single: 196case SpecialType.System_Double: 197case SpecialType.System_Decimal: 207public static bool IsIntegralType(this SpecialType specialType) 211case SpecialType.System_Byte: 212case SpecialType.System_SByte: 213case SpecialType.System_Int16: 214case SpecialType.System_UInt16: 215case SpecialType.System_Int32: 216case SpecialType.System_UInt32: 217case SpecialType.System_Int64: 218case SpecialType.System_UInt64: 225public static bool IsUnsignedIntegralType(this SpecialType specialType) 229case SpecialType.System_Byte: 230case SpecialType.System_UInt16: 231case SpecialType.System_UInt32: 232case SpecialType.System_UInt64: 239public static bool IsSignedIntegralType(this SpecialType specialType) 243case SpecialType.System_SByte: 244case SpecialType.System_Int16: 245case SpecialType.System_Int32: 246case SpecialType.System_Int64: 258public static int VBForToShiftBits(this SpecialType specialType) 262case SpecialType.System_SByte: 264case SpecialType.System_Int16: 266case SpecialType.System_Int32: 268case SpecialType.System_Int64: 275public static SpecialType FromRuntimeTypeOfLiteralValue(object value) 282return SpecialType.System_Int32; 287return SpecialType.System_String; 292return SpecialType.System_Boolean; 297return SpecialType.System_Char; 302return SpecialType.System_Int64; 307return SpecialType.System_Double; 312return SpecialType.System_UInt32; 317return SpecialType.System_UInt64; 322return SpecialType.System_Single; 327return SpecialType.System_Decimal; 332return SpecialType.System_Int16; 337return SpecialType.System_UInt16; 342return SpecialType.System_DateTime; 347return SpecialType.System_Byte; 352return SpecialType.System_SByte; 355return SpecialType.None; 365public static bool CanOptimizeBehavior(this SpecialType specialType) 366=> specialType is >= SpecialType.System_Object and <= SpecialType.System_Runtime_CompilerServices_InlineArrayAttribute; 371internal static ulong ConvertUnderlyingValueToUInt64(this SpecialType enumUnderlyingType, object value) 379SpecialType.System_SByte => (ulong)(sbyte)value, 380SpecialType.System_Int16 => (ulong)(short)value, 381SpecialType.System_Int32 => (ulong)(int)value, 382SpecialType.System_Int64 => (ulong)(long)value, 383SpecialType.System_Byte => (byte)value, 384SpecialType.System_UInt16 => (ushort)value, 385SpecialType.System_UInt32 => (uint)value, 386SpecialType.System_UInt64 => (ulong)value,
Symbols\IMethodSymbolExtensions.cs (2)
46method.Parameters is [{ Type.SpecialType: SpecialType.System_Object }, var secondParam] && 107methodSymbol.ReturnType.SpecialType == SpecialType.System_Int32 ||
Symbols\INamedTypeSymbolExtensions.cs (1)
664ContainingType.SpecialType: SpecialType.System_Object,
Symbols\ISymbolExtensions.cs (4)
512.Select(p => (p.Type ?? compilation.GetSpecialType(SpecialType.System_Object)).WithNullableAnnotation(p.NullableAnnotation)); 517types = types.Concat((method.ReturnType ?? compilation.GetSpecialType(SpecialType.System_Object)).WithNullableAnnotation(method.ReturnNullableAnnotation)); 680if (!returnType.GetMembers().OfType<IPropertySymbol>().Any(p => p.Name == WellKnownMemberNames.IsCompleted && p.Type.SpecialType == SpecialType.System_Boolean && p.GetMethod != null)) 730ReturnType.SpecialType: SpecialType.System_Boolean,
Symbols\ITypeSymbolExtensions.cs (56)
55=> symbol?.SpecialType == SpecialType.System_Void; 58=> symbol?.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T; 268case SpecialType.System_Array or SpecialType.System_ValueType: 271case SpecialType.System_Delegate: 272case SpecialType.System_MulticastDelegate: 273case SpecialType.System_Enum: 286case SpecialType.System_Byte: 287case SpecialType.System_SByte: 288case SpecialType.System_Int16: 289case SpecialType.System_UInt16: 290case SpecialType.System_Int32: 291case SpecialType.System_UInt32: 292case SpecialType.System_Int64: 293case SpecialType.System_UInt64: 294case SpecialType.System_Single: 295case SpecialType.System_Double: 296case SpecialType.System_Decimal: 297case SpecialType.System_IntPtr when type.IsNativeIntegerType: 298case SpecialType.System_UIntPtr when type.IsNativeIntegerType: 374case SpecialType.System_Object: 375case SpecialType.System_Void: 376case SpecialType.System_Boolean: 377case SpecialType.System_SByte: 378case SpecialType.System_Byte: 379case SpecialType.System_Decimal: 380case SpecialType.System_Single: 381case SpecialType.System_Double: 382case SpecialType.System_Int16: 383case SpecialType.System_Int32: 384case SpecialType.System_Int64: 385case SpecialType.System_Char: 386case SpecialType.System_String: 387case SpecialType.System_UInt16: 388case SpecialType.System_UInt32: 389case SpecialType.System_UInt64: 390case SpecialType.System_IntPtr when symbol.IsNativeIntegerType: 391case SpecialType.System_UIntPtr when symbol.IsNativeIntegerType: 402typeSymbol.AllInterfaces.Any(static i => i.SpecialType == SpecialType.System_Collections_IEnumerable) && 651case SpecialType.System_Boolean: 652case SpecialType.System_Char: 653case SpecialType.System_SByte: 654case SpecialType.System_Byte: 655case SpecialType.System_Int16: 656case SpecialType.System_UInt16: 657case SpecialType.System_Int32: 658case SpecialType.System_UInt32: 659case SpecialType.System_Int64: 660case SpecialType.System_UInt64: 661case SpecialType.System_Decimal: 662case SpecialType.System_Single: 663case SpecialType.System_Double: 666case SpecialType.System_IntPtr: 667case SpecialType.System_UIntPtr: 670case SpecialType.System_DateTime: 759namedType.OriginalDefinition.GetAttributes().Any(static a => a.AttributeClass?.SpecialType == SpecialType.System_Runtime_CompilerServices_InlineArrayAttribute);
Symbols\PredefinedTypeExtensions.cs (41)
13public static SpecialType ToSpecialType(this PredefinedType predefinedType) 16PredefinedType.Object => SpecialType.System_Object, 17PredefinedType.Void => SpecialType.System_Void, 18PredefinedType.Boolean => SpecialType.System_Boolean, 19PredefinedType.Char => SpecialType.System_Char, 20PredefinedType.SByte => SpecialType.System_SByte, 21PredefinedType.Byte => SpecialType.System_Byte, 22PredefinedType.Int16 => SpecialType.System_Int16, 23PredefinedType.UInt16 => SpecialType.System_UInt16, 24PredefinedType.Int32 => SpecialType.System_Int32, 25PredefinedType.UInt32 => SpecialType.System_UInt32, 26PredefinedType.Int64 => SpecialType.System_Int64, 27PredefinedType.UInt64 => SpecialType.System_UInt64, 28PredefinedType.Decimal => SpecialType.System_Decimal, 29PredefinedType.Single => SpecialType.System_Single, 30PredefinedType.Double => SpecialType.System_Double, 31PredefinedType.String => SpecialType.System_String, 32PredefinedType.DateTime => SpecialType.System_DateTime, 33PredefinedType.IntPtr => SpecialType.System_IntPtr, 34PredefinedType.UIntPtr => SpecialType.System_UIntPtr, 35_ => SpecialType.None, 38public static PredefinedType ToPredefinedType(this SpecialType specialType) 41SpecialType.System_Object => PredefinedType.Object, 42SpecialType.System_Void => PredefinedType.Void, 43SpecialType.System_Boolean => PredefinedType.Boolean, 44SpecialType.System_Char => PredefinedType.Char, 45SpecialType.System_SByte => PredefinedType.SByte, 46SpecialType.System_Byte => PredefinedType.Byte, 47SpecialType.System_Int16 => PredefinedType.Int16, 48SpecialType.System_UInt16 => PredefinedType.UInt16, 49SpecialType.System_Int32 => PredefinedType.Int32, 50SpecialType.System_UInt32 => PredefinedType.UInt32, 51SpecialType.System_Int64 => PredefinedType.Int64, 52SpecialType.System_UInt64 => PredefinedType.UInt64, 53SpecialType.System_Decimal => PredefinedType.Decimal, 54SpecialType.System_Single => PredefinedType.Single, 55SpecialType.System_Double => PredefinedType.Double, 56SpecialType.System_String => PredefinedType.String, 57SpecialType.System_DateTime => PredefinedType.DateTime, 58SpecialType.System_IntPtr => PredefinedType.IntPtr, 59SpecialType.System_UIntPtr => PredefinedType.UIntPtr,
Symbols\SymbolEquivalenceComparer.cs (1)
198=> symbol.IsKind(SymbolKind.NamedType, out ITypeSymbol? typeSymbol) && typeSymbol.SpecialType == SpecialType.System_Object;
Microsoft.CodeAnalysis.Features (140)
AddDebuggerDisplay\AbstractAddDebuggerDisplayCodeRefactoringProvider.cs (1)
165returnType: generator.TypeExpression(SpecialType.System_String),
Completion\Providers\AbstractObjectCreationCompletionProvider.cs (2)
68if (type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T) 71if (type.SpecialType == SpecialType.System_Void)
Completion\Providers\AbstractObjectInitializerCompletionProvider.cs (10)
142case SpecialType.System_Enum: 143case SpecialType.System_String: 144case SpecialType.System_Object: 145case SpecialType.System_Delegate: 146case SpecialType.System_MulticastDelegate: 150case SpecialType.System_Array: 154case SpecialType.System_Collections_IEnumerable: 155case SpecialType.System_Collections_IEnumerator: 156case SpecialType.System_Collections_Generic_IEnumerable_T: 157case SpecialType.System_Collections_Generic_IEnumerator_T:
Completion\Providers\AbstractRecommendationServiceBasedCompletionProvider.cs (1)
62var inferredTypes = context.InferredTypes.Where(t => t.SpecialType != SpecialType.System_Void).ToSet(SymbolEqualityComparer.Default);
Completion\Providers\AbstractSymbolCompletionProvider.cs (1)
61if (symbol.ContainingType?.SpecialType == SpecialType.System_Object)
Completion\Providers\ImportCompletionProvider\TypeImportCompletionCacheEntry.cs (2)
194var isEnumBaseType = symbol.SpecialType is >= SpecialType.System_SByte and <= SpecialType.System_UInt64;
ConvertCast\AbstractConvertCastCodeRefactoringProvider.cs (1)
55if (type is { IsReferenceType: true } or { OriginalDefinition.SpecialType: SpecialType.System_Nullable_T })
ConvertForEachToFor\AbstractConvertForEachToForCodeRefactoringProvider.cs (2)
239if (collectionType.SpecialType == SpecialType.System_String) 241var charType = model.Compilation.GetSpecialType(SpecialType.System_Char);
ConvertForToForEach\AbstractConvertForToForEachCodeRefactoringProvider.cs (5)
112var ienumerableType = semanticModel.Compilation.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T); 113var ienumeratorType = semanticModel.Compilation.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerator_T); 345var indexerType = GetIndexerType(containingType, collectionType, semanticModel.Compilation.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T)); 349indexerType ?? semanticModel.Compilation.GetSpecialType(SpecialType.System_Object)); 534=> property is { IsIndexer: true, Parameters: [{ Type.SpecialType: SpecialType.System_Int32 }] };
ConvertToInterpolatedString\AbstractConvertConcatenationToInterpolatedStringRefactoringProvider.cs (2)
245if (symbol?.ContainingType.SpecialType == SpecialType.System_Object) 294ContainingType.SpecialType: SpecialType.System_String,
ConvertToInterpolatedString\AbstractConvertPlaceholderToInterpolatedStringRefactoringProvider.cs (2)
109var shouldReplaceInvocation = invocationSymbol is { ContainingType.SpecialType: SpecialType.System_String, Name: nameof(string.Format) }; 119var stringType = semanticModel.Compilation.GetSpecialType(SpecialType.System_String);
ConvertTupleToStruct\AbstractConvertTupleToStructCodeRefactoringProvider.cs (1)
869model.Compilation.GetSpecialType(SpecialType.System_Void),
DesignerAttribute\DesignerAttributeDiscoveryService.cs (1)
321if (attribute is { ConstructorArguments: [{ Type.SpecialType: SpecialType.System_String, Value: string stringValue }] })
EmbeddedLanguages\EmbeddedLanguageDetector.cs (1)
190m => m is IMethodSymbol { Parameters: [{ Type.SpecialType: SpecialType.System_String }, ..] });
ExtractClass\AbstractExtractClassRefactoringProvider.cs (1)
137private static bool HasBaseType(INamedTypeSymbol containingType) => containingType.BaseType?.SpecialType != SpecialType.System_Object;
ExtractMethod\ExtractMethodFlowControlInformation.cs (6)
61var controlFlowValueType = compilation.GetSpecialType(SpecialType.System_Void); 68controlFlowValueType = compilation.GetSpecialType(SpecialType.System_Boolean); 73controlFlowValueType = compilation.GetSpecialType(SpecialType.System_Nullable_T).Construct(compilation.GetSpecialType(SpecialType.System_Boolean)); 78controlFlowValueType = compilation.GetSpecialType(SpecialType.System_Int32); 118=> ControlFlowValueType.SpecialType != SpecialType.System_Void;
ExtractMethod\MethodExtractor.Analyzer.cs (2)
187return compilation.GetSpecialType(SpecialType.System_Void); 202return compilation.GetSpecialType(SpecialType.System_Void);
ExtractMethod\MethodExtractor.CodeGenerator.cs (5)
263if (returnType != null && returnType.SpecialType != SpecialType.System_Void) 461return AnalyzerResult.CoreReturnType.SpecialType != SpecialType.System_Void 475if (controlFlowValueType.SpecialType == SpecialType.System_Void) 482if (coreReturnType.SpecialType == SpecialType.System_Void) 500return type.SpecialType == SpecialType.System_Void
ExtractMethod\MethodExtractor.cs (1)
228if (type.SpecialType == SpecialType.System_Void)
ExtractMethod\SelectionResult.cs (1)
69return (returnType ?? this.SemanticDocument.SemanticModel.Compilation.GetSpecialType(SpecialType.System_Object), returnsByRef);
GenerateComparisonOperators\GenerateComparisonOperatorsCodeRefactoringProvider.cs (1)
181var boolType = compilation.GetSpecialType(SpecialType.System_Boolean);
GenerateEqualsAndGetHashCodeFromMembers\AbstractGenerateEqualsAndGetHashCodeService.cs (1)
138returnType: compilation.GetSpecialType(SpecialType.System_Int32),
GenerateEqualsAndGetHashCodeFromMembers\GenerateEqualsAndGetHashCodeAction.cs (2)
164compilation.GetSpecialType(SpecialType.System_Boolean), 181compilation.GetSpecialType(SpecialType.System_Boolean),
GenerateType\AbstractGenerateTypeService.GenerateNamedType.cs (1)
75return _state.Compilation.GetSpecialType(SpecialType.System_Void);
GenerateType\AbstractGenerateTypeService.State.cs (6)
246SpecialType.System_Object or 247SpecialType.System_Array or 248SpecialType.System_Delegate or 249SpecialType.System_MulticastDelegate or 250SpecialType.System_ValueType or 251SpecialType.System_Enum)
InheritanceMargin\AbstractInheritanceMarginService_Helpers.cs (3)
300.WhereAsArray(symbol => !symbol.IsErrorType() && symbol.SpecialType is not (SpecialType.System_Object or SpecialType.System_ValueType or SpecialType.System_Enum));
InitializeParameter\AbstractAddParameterCheckCodeRefactoringProvider.cs (10)
124if (parameter.Type.SpecialType == SpecialType.System_String) 209if (parameter.Type.SpecialType == SpecialType.System_String) 283else if (parameter.Type.SpecialType == SpecialType.System_String && 422var enumType = compilation.GetSpecialType(SpecialType.System_Enum); 532return targetMethod.ContainingType.SpecialType == SpecialType.System_String; 642var enumType = compilation.GetSpecialType(SpecialType.System_Enum); 677compilation.GetSpecialType(SpecialType.System_Int32), 698.FirstOrDefault(s => s is IMethodSymbol { Parameters: [{ Type.SpecialType: SpecialType.System_Object }, ..] }); 765.FirstOrDefault(s => s is IMethodSymbol { Parameters: [{ Type.SpecialType: SpecialType.System_String }, ..] }); 776var stringType = compilation.GetSpecialType(SpecialType.System_String);
InlineHints\AbstractInlineParameterNameHintsService.cs (1)
246return parameter.Type.SpecialType == SpecialType.System_Boolean;
IntroduceUsingStatement\AbstractIntroduceUsingStatementCodeRefactoringProvider.cs (2)
68var disposableType = semanticModel.Compilation.GetSpecialType(SpecialType.System_IDisposable); 105var disposableType = semanticModel.Compilation.GetSpecialType(SpecialType.System_IDisposable);
IntroduceVariable\AbstractIntroduceLocalForExpressionCodeRefactoringProvider.cs (1)
45type.SpecialType == SpecialType.System_Void)
IntroduceVariable\AbstractIntroduceVariableService.cs (2)
383if (typeInfo.Type?.SpecialType == SpecialType.System_String && 401return semanticModel.Compilation.GetSpecialType(SpecialType.System_Object);
IntroduceVariable\AbstractIntroduceVariableService.State_Block.cs (1)
30if (type == null || type.SpecialType == SpecialType.System_Void)
IntroduceVariable\AbstractIntroduceVariableService.State_Query.cs (1)
30if (info.Type == null || info.Type.SpecialType == SpecialType.System_Void)
LanguageServices\SymbolDisplayService\AbstractSymbolDisplayService.AbstractSymbolDescriptionBuilder.cs (1)
497if (symbol.IsEnumType() && symbol.EnumUnderlyingType!.SpecialType != SpecialType.System_Int32)
MetadataAsSource\AbstractMetadataAsSourceService.WrappedNamedTypeSymbol.cs (1)
68public SpecialType SpecialType => _symbol.SpecialType;
PreferFrameworkType\PreferFrameworkTypeCodeFixProvider.cs (2)
60var replacementNode = typeSymbol.SpecialType is SpecialType.System_IntPtr or SpecialType.System_UIntPtr
PreferFrameworkType\PreferFrameworkTypeDiagnosticAnalyzerBase.cs (1)
87typeSymbol.SpecialType is SpecialType.None)
QuickInfo\QuickInfoUtilities.cs (1)
50if (symbol is INamedTypeSymbol { SpecialType: SpecialType.System_Void })
ReplaceMethodWithProperty\ReplaceMethodWithPropertyCodeRefactoringProvider.cs (1)
125if (current.ContainingType.SpecialType == SpecialType.System_Object)
RQName\RQNodeBuilder.cs (2)
70if (type != type.ConstructedFrom || type.SpecialType == SpecialType.System_Void) 265if (symbol.SpecialType == SpecialType.System_Void)
Snippets\SnippetProviders\AbstractConditionalBlockSnippetProvider.cs (1)
21=> type.SpecialType == SpecialType.System_Boolean;
Snippets\SnippetProviders\AbstractMainMethodSnippetProvider.cs (1)
31type: generator.ArrayTypeExpression(generator.TypeExpression(SpecialType.System_String)))],
src\Analyzers\Core\Analyzers\ForEachCast\AbstractForEachCastDiagnosticAnalyzer.cs (7)
98if (collectionElementType.SpecialType == SpecialType.System_Object) 100var ienumerableOfT = collectionType.AllInterfaces.FirstOrDefault(i => i.OriginalDefinition.SpecialType == SpecialType.System_Collections_Generic_IEnumerable_T); 141var isFixable = collectionType.SpecialType == SpecialType.System_Collections_IEnumerable || collectionType.AllInterfaces.Any(static i => i.SpecialType == SpecialType.System_Collections_IEnumerable) && 157=> collectionElementType.SpecialType != SpecialType.System_Object || 158collectionType.OriginalDefinition.SpecialType == SpecialType.System_Collections_Generic_IEnumerable_T || 159collectionType.AllInterfaces.Any(static i => i.OriginalDefinition.SpecialType == SpecialType.System_Collections_Generic_IEnumerable_T);
src\Analyzers\Core\Analyzers\Helpers\HashCodeAnalyzer\HashCodeAnalyzer.cs (1)
30var objectType = compilation.GetSpecialType(SpecialType.System_Object);
src\Analyzers\Core\Analyzers\PopulateSwitch\AbstractPopulateSwitchDiagnosticAnalyzer.cs (2)
84if (typeWithoutNullable.SpecialType == SpecialType.System_Boolean) 100if (type.RemoveNullableIfPresent() is not { SpecialType: SpecialType.System_Boolean })
src\Analyzers\Core\Analyzers\PopulateSwitch\PopulateSwitchStatementHelpers.cs (1)
158if (member is not IFieldSymbol fieldSymbol || fieldSymbol.Type.SpecialType != SpecialType.None)
src\Analyzers\Core\Analyzers\RemoveRedundantEquality\AbstractRemoveRedundantEqualityDiagnosticAnalyzer.cs (2)
88if (leftType?.SpecialType != SpecialType.System_Boolean || 89rightType?.SpecialType != SpecialType.System_Boolean)
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (2)
849attribute.AttributeConstructor?.Parameters is [_, { Name: "checkId", Type.SpecialType: SpecialType.System_String }, ..] && 858attribute.AttributeConstructor.Parameters[0].Type.SpecialType == SpecialType.System_String &&
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (2)
777attribute.ConstructorArguments is [{ Kind: TypedConstantKind.Primitive, Type.SpecialType: SpecialType.System_String, Value: string value }]) 939(IsSpecialMethodWithMatchingProperty("ShouldSerialize") && methodSymbol.ReturnType.SpecialType == SpecialType.System_Boolean ||
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.BlockAnalyzer.cs (1)
177value.Type.SpecialType == SpecialType.System_Void)
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.cs (3)
233method.Parameters is [{ Type.SpecialType: SpecialType.System_Object }, var secondParam] && 273if (method is { MetadataName: "GetInstance", IsStatic: true, Parameters: [{ Type.SpecialType: SpecialType.System_String }] } && 295if (parameter.Type.SpecialType != SpecialType.System_Int32)
src\Analyzers\Core\Analyzers\SimplifyBooleanExpression\AbstractSimplifyConditionalDiagnosticAnalyzer.cs (2)
154typeInfo.Type?.SpecialType == SpecialType.System_Boolean && 155typeInfo.ConvertedType?.SpecialType == SpecialType.System_Boolean;
src\Analyzers\Core\Analyzers\SimplifyInterpolation\AbstractSimplifyInterpolationHelpers.cs (1)
139return method.ContainingType.SpecialType == SpecialType.System_Object
src\Analyzers\Core\Analyzers\UseIsNullCheck\AbstractUseIsNullForReferenceEqualsDiagnosticAnalyzer.cs (1)
34var objectType = context.Compilation.GetSpecialType(SpecialType.System_Object);
src\Analyzers\Core\Analyzers\UseNullPropagation\AbstractUseNullPropagationDiagnosticAnalyzer.cs (5)
26ContainingType.OriginalDefinition.SpecialType: SpecialType.System_Nullable_T, 91var objectType = context.Compilation.GetSpecialType(SpecialType.System_Object); 158if (type is not INamedTypeSymbol namedType || namedType.ConstructedFrom.SpecialType != SpecialType.System_Nullable_T) 191var whenPartIsNullable = whenPartType?.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T; 373if (typeSymbol?.SpecialType == SpecialType.System_Object)
src\Analyzers\Core\Analyzers\UseNullPropagation\AbstractUseNullPropagationDiagnosticAnalyzer_IfStatement.cs (1)
118var whenPartIsNullable = semanticModel.GetTypeInfo(whenPartMatch).Type?.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T;
src\Analyzers\Core\Analyzers\ValidateFormatString\AbstractValidateFormatStringDiagnosticAnalyzer.cs (1)
303if (containingType.SpecialType != SpecialType.System_String)
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.State.cs (9)
378case SpecialType.System_Boolean: 379case SpecialType.System_Byte: 380case SpecialType.System_Char: 381case SpecialType.System_Int16: 382case SpecialType.System_Int32: 383case SpecialType.System_Int64: 384case SpecialType.System_Double: 385case SpecialType.System_Single: 386case SpecialType.System_String:
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateDeconstructMethodService.State.cs (1)
75returnType: semanticModel.Compilation.GetSpecialType(SpecialType.System_Void),
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.cs (1)
61if (typeParameters.Length == 0 && returnType.SpecialType != SpecialType.System_Void)
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.State.cs (1)
444inferredType = inferredType.SpecialType == SpecialType.System_Void
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementHelpers.cs (1)
251var idisposable = compilation.GetSpecialType(SpecialType.System_IDisposable);
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator.cs (1)
273var condition3 = typeParameter.HasReferenceTypeConstraint && typeParameter.ConstraintTypes.Any(static ts => ts.IsReferenceType && ts.SpecialType != SpecialType.System_Object);
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator_DisposePattern.cs (2)
175compilation.GetSpecialType(SpecialType.System_Boolean), 238var boolType = compilation.GetSpecialType(SpecialType.System_Boolean);
ValueTracking\ValueTracker.cs (1)
246return methodSymbol.ReturnType.SpecialType != SpecialType.System_Void;
Microsoft.CodeAnalysis.Features.UnitTests (9)
FindUsages\DefinitionItemFactoryTests.cs (9)
981var i = compilation.GetSpecialType(SpecialType.System_Int32); 1036var i = compilation.GetSpecialType(SpecialType.System_Int32); 1088var i = compilation.GetSpecialType(SpecialType.System_Int32); 1152var i = compilation.GetSpecialType(SpecialType.System_Int32); 1209var i = compilation.GetSpecialType(SpecialType.System_Int32); 1264var i = compilation.GetSpecialType(SpecialType.System_Int32); 1344var i = compilation.GetSpecialType(SpecialType.System_Int32); 1522var i = compilation.GetSpecialType(SpecialType.System_Int32); 1593var i = compilation.GetSpecialType(SpecialType.System_Int32);
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (439)
src\Compilers\Core\Portable\SpecialTypeExtensions.cs (154)
17public static bool IsClrInteger(this SpecialType specialType) 21case SpecialType.System_Boolean: 22case SpecialType.System_Char: 23case SpecialType.System_Byte: 24case SpecialType.System_SByte: 25case SpecialType.System_Int16: 26case SpecialType.System_UInt16: 27case SpecialType.System_Int32: 28case SpecialType.System_UInt32: 29case SpecialType.System_Int64: 30case SpecialType.System_UInt64: 31case SpecialType.System_IntPtr: 32case SpecialType.System_UIntPtr: 42public static bool IsBlittable(this SpecialType specialType) 46case SpecialType.System_Boolean: 47case SpecialType.System_Char: 48case SpecialType.System_Byte: 49case SpecialType.System_SByte: 50case SpecialType.System_Int16: 51case SpecialType.System_UInt16: 52case SpecialType.System_Int32: 53case SpecialType.System_UInt32: 54case SpecialType.System_Int64: 55case SpecialType.System_UInt64: 56case SpecialType.System_Single: 57case SpecialType.System_Double: 64public static bool IsValueType(this SpecialType specialType) 68case SpecialType.System_Void: 69case SpecialType.System_Boolean: 70case SpecialType.System_Char: 71case SpecialType.System_Byte: 72case SpecialType.System_SByte: 73case SpecialType.System_Int16: 74case SpecialType.System_UInt16: 75case SpecialType.System_Int32: 76case SpecialType.System_UInt32: 77case SpecialType.System_Int64: 78case SpecialType.System_UInt64: 79case SpecialType.System_Single: 80case SpecialType.System_Double: 81case SpecialType.System_Decimal: 82case SpecialType.System_IntPtr: 83case SpecialType.System_UIntPtr: 84case SpecialType.System_Nullable_T: 85case SpecialType.System_DateTime: 86case SpecialType.System_TypedReference: 87case SpecialType.System_ArgIterator: 88case SpecialType.System_RuntimeArgumentHandle: 89case SpecialType.System_RuntimeFieldHandle: 90case SpecialType.System_RuntimeMethodHandle: 91case SpecialType.System_RuntimeTypeHandle: 98public static int SizeInBytes(this SpecialType specialType) 102case SpecialType.System_SByte: 104case SpecialType.System_Byte: 106case SpecialType.System_Int16: 108case SpecialType.System_UInt16: 110case SpecialType.System_Int32: 112case SpecialType.System_UInt32: 114case SpecialType.System_Int64: 116case SpecialType.System_UInt64: 118case SpecialType.System_Char: 120case SpecialType.System_Single: 122case SpecialType.System_Double: 124case SpecialType.System_Boolean: 127case SpecialType.System_Decimal: 141public static bool IsPrimitiveRecursiveStruct(this SpecialType specialType) 145case SpecialType.System_Boolean: 146case SpecialType.System_Byte: 147case SpecialType.System_Char: 148case SpecialType.System_Double: 149case SpecialType.System_Int16: 150case SpecialType.System_Int32: 151case SpecialType.System_Int64: 152case SpecialType.System_UInt16: 153case SpecialType.System_UInt32: 154case SpecialType.System_UInt64: 155case SpecialType.System_IntPtr: 156case SpecialType.System_UIntPtr: 157case SpecialType.System_SByte: 158case SpecialType.System_Single: 165public static bool IsValidEnumUnderlyingType(this SpecialType specialType) 169case SpecialType.System_Byte: 170case SpecialType.System_SByte: 171case SpecialType.System_Int16: 172case SpecialType.System_UInt16: 173case SpecialType.System_Int32: 174case SpecialType.System_UInt32: 175case SpecialType.System_Int64: 176case SpecialType.System_UInt64: 183public static bool IsNumericType(this SpecialType specialType) 187case SpecialType.System_Byte: 188case SpecialType.System_SByte: 189case SpecialType.System_Int16: 190case SpecialType.System_UInt16: 191case SpecialType.System_Int32: 192case SpecialType.System_UInt32: 193case SpecialType.System_Int64: 194case SpecialType.System_UInt64: 195case SpecialType.System_Single: 196case SpecialType.System_Double: 197case SpecialType.System_Decimal: 207public static bool IsIntegralType(this SpecialType specialType) 211case SpecialType.System_Byte: 212case SpecialType.System_SByte: 213case SpecialType.System_Int16: 214case SpecialType.System_UInt16: 215case SpecialType.System_Int32: 216case SpecialType.System_UInt32: 217case SpecialType.System_Int64: 218case SpecialType.System_UInt64: 225public static bool IsUnsignedIntegralType(this SpecialType specialType) 229case SpecialType.System_Byte: 230case SpecialType.System_UInt16: 231case SpecialType.System_UInt32: 232case SpecialType.System_UInt64: 239public static bool IsSignedIntegralType(this SpecialType specialType) 243case SpecialType.System_SByte: 244case SpecialType.System_Int16: 245case SpecialType.System_Int32: 246case SpecialType.System_Int64: 258public static int VBForToShiftBits(this SpecialType specialType) 262case SpecialType.System_SByte: 264case SpecialType.System_Int16: 266case SpecialType.System_Int32: 268case SpecialType.System_Int64: 275public static SpecialType FromRuntimeTypeOfLiteralValue(object value) 282return SpecialType.System_Int32; 287return SpecialType.System_String; 292return SpecialType.System_Boolean; 297return SpecialType.System_Char; 302return SpecialType.System_Int64; 307return SpecialType.System_Double; 312return SpecialType.System_UInt32; 317return SpecialType.System_UInt64; 322return SpecialType.System_Single; 327return SpecialType.System_Decimal; 332return SpecialType.System_Int16; 337return SpecialType.System_UInt16; 342return SpecialType.System_DateTime; 347return SpecialType.System_Byte; 352return SpecialType.System_SByte; 355return SpecialType.None; 365public static bool CanOptimizeBehavior(this SpecialType specialType) 366=> specialType is >= SpecialType.System_Object and <= SpecialType.System_Runtime_CompilerServices_InlineArrayAttribute; 371internal static ulong ConvertUnderlyingValueToUInt64(this SpecialType enumUnderlyingType, object value) 379SpecialType.System_SByte => (ulong)(sbyte)value, 380SpecialType.System_Int16 => (ulong)(short)value, 381SpecialType.System_Int32 => (ulong)(int)value, 382SpecialType.System_Int64 => (ulong)(long)value, 383SpecialType.System_Byte => (byte)value, 384SpecialType.System_UInt16 => (ushort)value, 385SpecialType.System_UInt32 => (uint)value, 386SpecialType.System_UInt64 => (ulong)value,
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (19)
340(binaryOperation.Type.SpecialType == SpecialType.System_Boolean && 374SpecialType.System_Boolean 375or SpecialType.System_Byte 376or SpecialType.System_Char 377or SpecialType.System_Double 378or SpecialType.System_Int16 379or SpecialType.System_Int32 380or SpecialType.System_Int64 381or SpecialType.System_UInt16 382or SpecialType.System_UInt32 383or SpecialType.System_UInt64 384or SpecialType.System_IntPtr 385or SpecialType.System_UIntPtr 386or SpecialType.System_SByte 387or SpecialType.System_Single 388or SpecialType.System_String 389or SpecialType.System_Object 390or SpecialType.System_ValueType 391or SpecialType.System_Void => true,
src\RoslynAnalyzers\Utilities\Compiler\DiagnosticHelpers.cs (11)
11public static bool TryConvertToUInt64(object? value, SpecialType specialType, out ulong convertedValue) 19case SpecialType.System_Int16: 23case SpecialType.System_Int32: 27case SpecialType.System_Int64: 31case SpecialType.System_UInt16: 35case SpecialType.System_UInt32: 39case SpecialType.System_UInt64: 43case SpecialType.System_Byte: 47case SpecialType.System_SByte: 51case SpecialType.System_Char: 55case SpecialType.System_Boolean:
src\RoslynAnalyzers\Utilities\Compiler\DoNotCatchGeneralUnlessRethrown.cs (1)
104compilation.GetSpecialType(SpecialType.System_Object),
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IMethodSymbolExtensions.cs (16)
31method.ReturnType.SpecialType == SpecialType.System_Boolean && 33method.Parameters[0].Type.SpecialType == SpecialType.System_Object && 43method.ContainingType.SpecialType == SpecialType.System_Object && 46method.ReturnType.SpecialType == SpecialType.System_Boolean && 48method.Parameters[0].Type.SpecialType == SpecialType.System_Object; 58method.ContainingType.SpecialType == SpecialType.System_Object && 60method.ReturnType.SpecialType == SpecialType.System_Boolean && 61method.Parameters[0].Type.SpecialType == SpecialType.System_Object && 62method.Parameters[1].Type.SpecialType == SpecialType.System_Object && 74if (overriddenMethod.ContainingType.SpecialType == SpecialType.System_Object) 189parameter.Type.SpecialType == SpecialType.System_Boolean && 238method.Parameters[0].Type.SpecialType == SpecialType.System_Boolean; 407method.Parameters[0].Type.SpecialType == SpecialType.System_Boolean && 421method.Parameters[1].Type.SpecialType == SpecialType.System_Boolean && 500method.Parameters[0].Type.SpecialType == SpecialType.System_Object; 540method.ReturnType.SpecialType == SpecialType.System_Boolean &&
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ITypeSymbolExtensions.cs (16)
22SpecialType.System_Boolean 23or SpecialType.System_Byte 24or SpecialType.System_Char 25or SpecialType.System_Double 26or SpecialType.System_Int16 27or SpecialType.System_Int32 28or SpecialType.System_Int64 29or SpecialType.System_UInt16 30or SpecialType.System_UInt32 31or SpecialType.System_UInt64 32or SpecialType.System_SByte 33or SpecialType.System_Single 34or SpecialType.System_String => true, 251=> typeSymbol.IsValueType || typeSymbol.SpecialType == SpecialType.System_String; 259=> typeSymbol != null && typeSymbol.IsValueType && typeSymbol.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T; 265=> typeSymbol.IsNullableValueType() && ((INamedTypeSymbol)typeSymbol).TypeArguments[0].SpecialType == SpecialType.System_Boolean;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (2)
157type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T || 174if (type.SpecialType == SpecialType.System_String)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SemanticFacts\ISemanticFactsExtensions.cs (2)
119=> type?.SpecialType is SpecialType.System_Single or SpecialType.System_Double;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Simplification\SpecialTypeAnnotation.cs (8)
14private static readonly ConcurrentDictionary<SpecialType, string> s_fromSpecialTypes = new(); 15private static readonly ConcurrentDictionary<string, SpecialType> s_toSpecialTypes = new(); 17public static SyntaxAnnotation Create(SpecialType specialType) 20public static SpecialType GetSpecialType(SyntaxAnnotation annotation) 23private static string CreateFromSpecialTypes(SpecialType arg) 26private static SpecialType CreateToSpecialTypes(string arg) 27=> (SpecialType)Enum.Parse(typeof(SpecialType), arg);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.NamedTypeSymbolKey.cs (1)
26visitor.WriteBoolean(symbol.SpecialType == SpecialType.System_IntPtr);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (6)
758&& symbol.ContainingType.SpecialType == SpecialType.System_Object 1017if (newReceiverType.SpecialType != SpecialType.None) 1024return newSymbolContainingType.SpecialType is SpecialType.System_Array or 1025SpecialType.System_Delegate or 1026SpecialType.System_Enum or 1027SpecialType.System_String;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (9)
58private static object CreateOne(SpecialType specialType) 61SpecialType.System_SByte => (sbyte)1, 62SpecialType.System_Byte => (byte)1, 63SpecialType.System_Int16 => (short)1, 64SpecialType.System_UInt16 => (ushort)1, 65SpecialType.System_Int32 => 1, 66SpecialType.System_UInt32 => (uint)1, 67SpecialType.System_Int64 => (long)1, 68SpecialType.System_UInt64 => (ulong)1,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IntegerUtilities.cs (7)
60public static long Convert(long v, SpecialType type) 63SpecialType.System_SByte => unchecked((sbyte)v), 64SpecialType.System_Byte => unchecked((byte)v), 65SpecialType.System_Int16 => unchecked((short)v), 66SpecialType.System_UInt16 => unchecked((ushort)v), 67SpecialType.System_Int32 => unchecked((int)v), 68SpecialType.System_UInt32 => unchecked((uint)v),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\IMethodSymbolExtensions.cs (2)
46method.Parameters is [{ Type.SpecialType: SpecialType.System_Object }, var secondParam] && 107methodSymbol.ReturnType.SpecialType == SpecialType.System_Int32 ||
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (1)
664ContainingType.SpecialType: SpecialType.System_Object,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (4)
512.Select(p => (p.Type ?? compilation.GetSpecialType(SpecialType.System_Object)).WithNullableAnnotation(p.NullableAnnotation)); 517types = types.Concat((method.ReturnType ?? compilation.GetSpecialType(SpecialType.System_Object)).WithNullableAnnotation(method.ReturnNullableAnnotation)); 680if (!returnType.GetMembers().OfType<IPropertySymbol>().Any(p => p.Name == WellKnownMemberNames.IsCompleted && p.Type.SpecialType == SpecialType.System_Boolean && p.GetMethod != null)) 730ReturnType.SpecialType: SpecialType.System_Boolean,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (56)
55=> symbol?.SpecialType == SpecialType.System_Void; 58=> symbol?.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T; 268case SpecialType.System_Array or SpecialType.System_ValueType: 271case SpecialType.System_Delegate: 272case SpecialType.System_MulticastDelegate: 273case SpecialType.System_Enum: 286case SpecialType.System_Byte: 287case SpecialType.System_SByte: 288case SpecialType.System_Int16: 289case SpecialType.System_UInt16: 290case SpecialType.System_Int32: 291case SpecialType.System_UInt32: 292case SpecialType.System_Int64: 293case SpecialType.System_UInt64: 294case SpecialType.System_Single: 295case SpecialType.System_Double: 296case SpecialType.System_Decimal: 297case SpecialType.System_IntPtr when type.IsNativeIntegerType: 298case SpecialType.System_UIntPtr when type.IsNativeIntegerType: 374case SpecialType.System_Object: 375case SpecialType.System_Void: 376case SpecialType.System_Boolean: 377case SpecialType.System_SByte: 378case SpecialType.System_Byte: 379case SpecialType.System_Decimal: 380case SpecialType.System_Single: 381case SpecialType.System_Double: 382case SpecialType.System_Int16: 383case SpecialType.System_Int32: 384case SpecialType.System_Int64: 385case SpecialType.System_Char: 386case SpecialType.System_String: 387case SpecialType.System_UInt16: 388case SpecialType.System_UInt32: 389case SpecialType.System_UInt64: 390case SpecialType.System_IntPtr when symbol.IsNativeIntegerType: 391case SpecialType.System_UIntPtr when symbol.IsNativeIntegerType: 402typeSymbol.AllInterfaces.Any(static i => i.SpecialType == SpecialType.System_Collections_IEnumerable) && 651case SpecialType.System_Boolean: 652case SpecialType.System_Char: 653case SpecialType.System_SByte: 654case SpecialType.System_Byte: 655case SpecialType.System_Int16: 656case SpecialType.System_UInt16: 657case SpecialType.System_Int32: 658case SpecialType.System_UInt32: 659case SpecialType.System_Int64: 660case SpecialType.System_UInt64: 661case SpecialType.System_Decimal: 662case SpecialType.System_Single: 663case SpecialType.System_Double: 666case SpecialType.System_IntPtr: 667case SpecialType.System_UIntPtr: 670case SpecialType.System_DateTime: 759namedType.OriginalDefinition.GetAttributes().Any(static a => a.AttributeClass?.SpecialType == SpecialType.System_Runtime_CompilerServices_InlineArrayAttribute);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\PredefinedTypeExtensions.cs (41)
13public static SpecialType ToSpecialType(this PredefinedType predefinedType) 16PredefinedType.Object => SpecialType.System_Object, 17PredefinedType.Void => SpecialType.System_Void, 18PredefinedType.Boolean => SpecialType.System_Boolean, 19PredefinedType.Char => SpecialType.System_Char, 20PredefinedType.SByte => SpecialType.System_SByte, 21PredefinedType.Byte => SpecialType.System_Byte, 22PredefinedType.Int16 => SpecialType.System_Int16, 23PredefinedType.UInt16 => SpecialType.System_UInt16, 24PredefinedType.Int32 => SpecialType.System_Int32, 25PredefinedType.UInt32 => SpecialType.System_UInt32, 26PredefinedType.Int64 => SpecialType.System_Int64, 27PredefinedType.UInt64 => SpecialType.System_UInt64, 28PredefinedType.Decimal => SpecialType.System_Decimal, 29PredefinedType.Single => SpecialType.System_Single, 30PredefinedType.Double => SpecialType.System_Double, 31PredefinedType.String => SpecialType.System_String, 32PredefinedType.DateTime => SpecialType.System_DateTime, 33PredefinedType.IntPtr => SpecialType.System_IntPtr, 34PredefinedType.UIntPtr => SpecialType.System_UIntPtr, 35_ => SpecialType.None, 38public static PredefinedType ToPredefinedType(this SpecialType specialType) 41SpecialType.System_Object => PredefinedType.Object, 42SpecialType.System_Void => PredefinedType.Void, 43SpecialType.System_Boolean => PredefinedType.Boolean, 44SpecialType.System_Char => PredefinedType.Char, 45SpecialType.System_SByte => PredefinedType.SByte, 46SpecialType.System_Byte => PredefinedType.Byte, 47SpecialType.System_Int16 => PredefinedType.Int16, 48SpecialType.System_UInt16 => PredefinedType.UInt16, 49SpecialType.System_Int32 => PredefinedType.Int32, 50SpecialType.System_UInt32 => PredefinedType.UInt32, 51SpecialType.System_Int64 => PredefinedType.Int64, 52SpecialType.System_UInt64 => PredefinedType.UInt64, 53SpecialType.System_Decimal => PredefinedType.Decimal, 54SpecialType.System_Single => PredefinedType.Single, 55SpecialType.System_Double => PredefinedType.Double, 56SpecialType.System_String => PredefinedType.String, 57SpecialType.System_DateTime => PredefinedType.DateTime, 58SpecialType.System_IntPtr => PredefinedType.IntPtr, 59SpecialType.System_UIntPtr => PredefinedType.UIntPtr,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.cs (1)
198=> symbol.IsKind(SymbolKind.NamedType, out ITypeSymbol? typeSymbol) && typeSymbol.SpecialType == SpecialType.System_Object;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractFlagsEnumGenerator.cs (5)
15protected abstract SyntaxNode CreateExplicitlyCastedLiteralValue(INamedTypeSymbol enumType, SpecialType underlyingSpecialType, object constantValue); 78var underlyingSpecialType = enumType.EnumUnderlyingType.SpecialType; 138IFieldSymbol field, INamedTypeSymbol enumType, SpecialType underlyingSpecialType) 172var underlyingSpecialType = enumType.EnumUnderlyingType.SpecialType; 188var underlyingSpecialType = enumType.EnumUnderlyingType.SpecialType;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (12)
83public static bool IsSpecialType([NotNullWhen(true)] ITypeSymbol? type, SpecialType specialType) 136SpecialType.System_SByte => value is sbyte, 137SpecialType.System_Byte => value is byte, 138SpecialType.System_Int16 => value is short, 139SpecialType.System_UInt16 => value is ushort, 140SpecialType.System_Int32 => value is int, 141SpecialType.System_UInt32 => value is uint, 142SpecialType.System_Int64 => value is long, 143SpecialType.System_UInt64 => value is ulong, 144SpecialType.System_Decimal => value is decimal, 145SpecialType.System_Single => value is float, 146SpecialType.System_Double => value is double,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationSymbolFactory.cs (5)
422SpecialType specialType = SpecialType.None, 441SpecialType specialType = SpecialType.None, 493specialType: SpecialType.None,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\LiteralSpecialValues.cs (11)
16public static bool HasSpecialValues(SpecialType specialType) 20case SpecialType.System_SByte: 21case SpecialType.System_Int16: 22case SpecialType.System_UInt16: 23case SpecialType.System_Int32: 24case SpecialType.System_UInt32: 25case SpecialType.System_Int64: 26case SpecialType.System_UInt64: 27case SpecialType.System_Single: 28case SpecialType.System_Double: 29case SpecialType.System_Decimal:
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationAbstractNamedTypeSymbol.cs (1)
29SpecialType specialType,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationArrayTypeSymbol.cs (1)
10internal sealed class CodeGenerationArrayTypeSymbol(ITypeSymbol elementType, int rank, NullableAnnotation nullableAnnotation) : CodeGenerationTypeSymbol(null, null, default, Accessibility.NotApplicable, default, string.Empty, SpecialType.None, nullableAnnotation), IArrayTypeSymbol
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationMethodSymbol.cs (1)
75=> this.ReturnType == null || this.ReturnType.SpecialType == SpecialType.System_Void;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationNamedTypeSymbol.cs (1)
34SpecialType specialType,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationPointerTypeSymbol.cs (1)
9internal sealed class CodeGenerationPointerTypeSymbol(ITypeSymbol pointedAtType) : CodeGenerationTypeSymbol(null, null, default, Accessibility.NotApplicable, default, string.Empty, SpecialType.None, NullableAnnotation.None), IPointerTypeSymbol
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationTypeParameterSymbol.cs (1)
24int ordinal) : CodeGenerationTypeSymbol(containingType?.ContainingAssembly, containingType, attributes, Accessibility.NotApplicable, default, name, SpecialType.None, nullableAnnotation), ITypeParameterSymbol
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationTypeSymbol.cs (2)
19SpecialType specialType, 23public SpecialType SpecialType { get; protected set; } = specialType;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (1)
85_ => compilation.GetSpecialType(SpecialType.System_Object),
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (19)
50returnType: compilation.GetSpecialType(SpecialType.System_Boolean), 55parameters: [CodeGenerationSymbolFactory.CreateParameterSymbol(compilation.GetSpecialType(SpecialType.System_Object).WithNullableAnnotation(NullableAnnotation.Annotated), ObjName)], 411case SpecialType.System_Boolean: 412case SpecialType.System_Char: 413case SpecialType.System_SByte: 414case SpecialType.System_Byte: 415case SpecialType.System_Int16: 416case SpecialType.System_UInt16: 417case SpecialType.System_Int32: 418case SpecialType.System_UInt32: 419case SpecialType.System_Int64: 420case SpecialType.System_UInt64: 421case SpecialType.System_Decimal: 422case SpecialType.System_Single: 423case SpecialType.System_Double: 424case SpecialType.System_String: 425case SpecialType.System_DateTime: 443method.ReturnType.SpecialType == SpecialType.System_Boolean && 444method.Parameters[0].Type.SpecialType == SpecialType.System_Object &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateGetHashCodeMethod.cs (4)
136? factory.SimpleLocalDeclarationStatement(generatorInternal, compilation.GetSpecialType(SpecialType.System_Int32), HashCodeName, CreateLiteralExpression(factory, initHash)) 137: factory.LocalDeclarationStatement(compilation.GetSpecialType(SpecialType.System_Int64), HashCodeName, CreateLiteralExpression(factory, initHash))); 166compilation.GetSpecialType(SpecialType.System_Int32), 210method.ReturnType.SpecialType == SpecialType.System_Int32 &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (12)
60SpecialType? patternValueType, 184else if (operation is IIsTypeOperation { TypeOperand.SpecialType: SpecialType.System_Object } && generatorInternal.SupportsPatterns(semanticModel.SyntaxTree.Options)) 305SpecialType? patternValueType) 307if (patternValueType is SpecialType specialType && specialType.IsNumericType()) 447if (containingType?.SpecialType == SpecialType.System_Array || 448containingType?.SpecialType == SpecialType.System_String) 458case SpecialType.System_Byte: 459case SpecialType.System_UInt16: 460case SpecialType.System_UInt32: 461case SpecialType.System_UInt64: 497SpecialType? patternValueType) 504if (patternValueType == SpecialType.System_Boolean)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.AbstractTypeInferrer.cs (2)
78protected IEnumerable<TypeInferenceInfo> CreateResult(SpecialType type, NullableAnnotation nullableAnnotation = NullableAnnotation.None) 120symbol.ContainingType?.SpecialType == SpecialType.System_Enum;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.cs (1)
46? [semanticModel.Compilation.GetSpecialType(SpecialType.System_Boolean)]
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\SimplificationHelpers.cs (2)
77var specialType = SpecialTypeAnnotation.GetSpecialType(annotation2); 78if (specialType != SpecialType.None)
Microsoft.CodeAnalysis.PublicApiAnalyzers (358)
DeclarePublicApiAnalyzer.Impl.cs (1)
611if (attribute.ConstructorArguments is not [{ Kind: TypedConstantKind.Primitive, Type.SpecialType: SpecialType.System_String, Value: string diagnosticId }])
src\Compilers\Core\Portable\SpecialTypeExtensions.cs (154)
17public static bool IsClrInteger(this SpecialType specialType) 21case SpecialType.System_Boolean: 22case SpecialType.System_Char: 23case SpecialType.System_Byte: 24case SpecialType.System_SByte: 25case SpecialType.System_Int16: 26case SpecialType.System_UInt16: 27case SpecialType.System_Int32: 28case SpecialType.System_UInt32: 29case SpecialType.System_Int64: 30case SpecialType.System_UInt64: 31case SpecialType.System_IntPtr: 32case SpecialType.System_UIntPtr: 42public static bool IsBlittable(this SpecialType specialType) 46case SpecialType.System_Boolean: 47case SpecialType.System_Char: 48case SpecialType.System_Byte: 49case SpecialType.System_SByte: 50case SpecialType.System_Int16: 51case SpecialType.System_UInt16: 52case SpecialType.System_Int32: 53case SpecialType.System_UInt32: 54case SpecialType.System_Int64: 55case SpecialType.System_UInt64: 56case SpecialType.System_Single: 57case SpecialType.System_Double: 64public static bool IsValueType(this SpecialType specialType) 68case SpecialType.System_Void: 69case SpecialType.System_Boolean: 70case SpecialType.System_Char: 71case SpecialType.System_Byte: 72case SpecialType.System_SByte: 73case SpecialType.System_Int16: 74case SpecialType.System_UInt16: 75case SpecialType.System_Int32: 76case SpecialType.System_UInt32: 77case SpecialType.System_Int64: 78case SpecialType.System_UInt64: 79case SpecialType.System_Single: 80case SpecialType.System_Double: 81case SpecialType.System_Decimal: 82case SpecialType.System_IntPtr: 83case SpecialType.System_UIntPtr: 84case SpecialType.System_Nullable_T: 85case SpecialType.System_DateTime: 86case SpecialType.System_TypedReference: 87case SpecialType.System_ArgIterator: 88case SpecialType.System_RuntimeArgumentHandle: 89case SpecialType.System_RuntimeFieldHandle: 90case SpecialType.System_RuntimeMethodHandle: 91case SpecialType.System_RuntimeTypeHandle: 98public static int SizeInBytes(this SpecialType specialType) 102case SpecialType.System_SByte: 104case SpecialType.System_Byte: 106case SpecialType.System_Int16: 108case SpecialType.System_UInt16: 110case SpecialType.System_Int32: 112case SpecialType.System_UInt32: 114case SpecialType.System_Int64: 116case SpecialType.System_UInt64: 118case SpecialType.System_Char: 120case SpecialType.System_Single: 122case SpecialType.System_Double: 124case SpecialType.System_Boolean: 127case SpecialType.System_Decimal: 141public static bool IsPrimitiveRecursiveStruct(this SpecialType specialType) 145case SpecialType.System_Boolean: 146case SpecialType.System_Byte: 147case SpecialType.System_Char: 148case SpecialType.System_Double: 149case SpecialType.System_Int16: 150case SpecialType.System_Int32: 151case SpecialType.System_Int64: 152case SpecialType.System_UInt16: 153case SpecialType.System_UInt32: 154case SpecialType.System_UInt64: 155case SpecialType.System_IntPtr: 156case SpecialType.System_UIntPtr: 157case SpecialType.System_SByte: 158case SpecialType.System_Single: 165public static bool IsValidEnumUnderlyingType(this SpecialType specialType) 169case SpecialType.System_Byte: 170case SpecialType.System_SByte: 171case SpecialType.System_Int16: 172case SpecialType.System_UInt16: 173case SpecialType.System_Int32: 174case SpecialType.System_UInt32: 175case SpecialType.System_Int64: 176case SpecialType.System_UInt64: 183public static bool IsNumericType(this SpecialType specialType) 187case SpecialType.System_Byte: 188case SpecialType.System_SByte: 189case SpecialType.System_Int16: 190case SpecialType.System_UInt16: 191case SpecialType.System_Int32: 192case SpecialType.System_UInt32: 193case SpecialType.System_Int64: 194case SpecialType.System_UInt64: 195case SpecialType.System_Single: 196case SpecialType.System_Double: 197case SpecialType.System_Decimal: 207public static bool IsIntegralType(this SpecialType specialType) 211case SpecialType.System_Byte: 212case SpecialType.System_SByte: 213case SpecialType.System_Int16: 214case SpecialType.System_UInt16: 215case SpecialType.System_Int32: 216case SpecialType.System_UInt32: 217case SpecialType.System_Int64: 218case SpecialType.System_UInt64: 225public static bool IsUnsignedIntegralType(this SpecialType specialType) 229case SpecialType.System_Byte: 230case SpecialType.System_UInt16: 231case SpecialType.System_UInt32: 232case SpecialType.System_UInt64: 239public static bool IsSignedIntegralType(this SpecialType specialType) 243case SpecialType.System_SByte: 244case SpecialType.System_Int16: 245case SpecialType.System_Int32: 246case SpecialType.System_Int64: 258public static int VBForToShiftBits(this SpecialType specialType) 262case SpecialType.System_SByte: 264case SpecialType.System_Int16: 266case SpecialType.System_Int32: 268case SpecialType.System_Int64: 275public static SpecialType FromRuntimeTypeOfLiteralValue(object value) 282return SpecialType.System_Int32; 287return SpecialType.System_String; 292return SpecialType.System_Boolean; 297return SpecialType.System_Char; 302return SpecialType.System_Int64; 307return SpecialType.System_Double; 312return SpecialType.System_UInt32; 317return SpecialType.System_UInt64; 322return SpecialType.System_Single; 327return SpecialType.System_Decimal; 332return SpecialType.System_Int16; 337return SpecialType.System_UInt16; 342return SpecialType.System_DateTime; 347return SpecialType.System_Byte; 352return SpecialType.System_SByte; 355return SpecialType.None; 365public static bool CanOptimizeBehavior(this SpecialType specialType) 366=> specialType is >= SpecialType.System_Object and <= SpecialType.System_Runtime_CompilerServices_InlineArrayAttribute; 371internal static ulong ConvertUnderlyingValueToUInt64(this SpecialType enumUnderlyingType, object value) 379SpecialType.System_SByte => (ulong)(sbyte)value, 380SpecialType.System_Int16 => (ulong)(short)value, 381SpecialType.System_Int32 => (ulong)(int)value, 382SpecialType.System_Int64 => (ulong)(long)value, 383SpecialType.System_Byte => (byte)value, 384SpecialType.System_UInt16 => (ushort)value, 385SpecialType.System_UInt32 => (uint)value, 386SpecialType.System_UInt64 => (ulong)value,
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (19)
340(binaryOperation.Type.SpecialType == SpecialType.System_Boolean && 374SpecialType.System_Boolean 375or SpecialType.System_Byte 376or SpecialType.System_Char 377or SpecialType.System_Double 378or SpecialType.System_Int16 379or SpecialType.System_Int32 380or SpecialType.System_Int64 381or SpecialType.System_UInt16 382or SpecialType.System_UInt32 383or SpecialType.System_UInt64 384or SpecialType.System_IntPtr 385or SpecialType.System_UIntPtr 386or SpecialType.System_SByte 387or SpecialType.System_Single 388or SpecialType.System_String 389or SpecialType.System_Object 390or SpecialType.System_ValueType 391or SpecialType.System_Void => true,
src\RoslynAnalyzers\Utilities\Compiler\DiagnosticHelpers.cs (11)
11public static bool TryConvertToUInt64(object? value, SpecialType specialType, out ulong convertedValue) 19case SpecialType.System_Int16: 23case SpecialType.System_Int32: 27case SpecialType.System_Int64: 31case SpecialType.System_UInt16: 35case SpecialType.System_UInt32: 39case SpecialType.System_UInt64: 43case SpecialType.System_Byte: 47case SpecialType.System_SByte: 51case SpecialType.System_Char: 55case SpecialType.System_Boolean:
src\RoslynAnalyzers\Utilities\Compiler\DoNotCatchGeneralUnlessRethrown.cs (1)
104compilation.GetSpecialType(SpecialType.System_Object),
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IMethodSymbolExtensions.cs (16)
31method.ReturnType.SpecialType == SpecialType.System_Boolean && 33method.Parameters[0].Type.SpecialType == SpecialType.System_Object && 43method.ContainingType.SpecialType == SpecialType.System_Object && 46method.ReturnType.SpecialType == SpecialType.System_Boolean && 48method.Parameters[0].Type.SpecialType == SpecialType.System_Object; 58method.ContainingType.SpecialType == SpecialType.System_Object && 60method.ReturnType.SpecialType == SpecialType.System_Boolean && 61method.Parameters[0].Type.SpecialType == SpecialType.System_Object && 62method.Parameters[1].Type.SpecialType == SpecialType.System_Object && 74if (overriddenMethod.ContainingType.SpecialType == SpecialType.System_Object) 189parameter.Type.SpecialType == SpecialType.System_Boolean && 238method.Parameters[0].Type.SpecialType == SpecialType.System_Boolean; 407method.Parameters[0].Type.SpecialType == SpecialType.System_Boolean && 421method.Parameters[1].Type.SpecialType == SpecialType.System_Boolean && 500method.Parameters[0].Type.SpecialType == SpecialType.System_Object; 540method.ReturnType.SpecialType == SpecialType.System_Boolean &&
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ITypeSymbolExtensions.cs (16)
22SpecialType.System_Boolean 23or SpecialType.System_Byte 24or SpecialType.System_Char 25or SpecialType.System_Double 26or SpecialType.System_Int16 27or SpecialType.System_Int32 28or SpecialType.System_Int64 29or SpecialType.System_UInt16 30or SpecialType.System_UInt32 31or SpecialType.System_UInt64 32or SpecialType.System_SByte 33or SpecialType.System_Single 34or SpecialType.System_String => true, 251=> typeSymbol.IsValueType || typeSymbol.SpecialType == SpecialType.System_String; 259=> typeSymbol != null && typeSymbol.IsValueType && typeSymbol.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T; 265=> typeSymbol.IsNullableValueType() && ((INamedTypeSymbol)typeSymbol).TypeArguments[0].SpecialType == SpecialType.System_Boolean;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (2)
157type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T || 174if (type.SpecialType == SpecialType.System_String)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SemanticFacts\ISemanticFactsExtensions.cs (2)
119=> type?.SpecialType is SpecialType.System_Single or SpecialType.System_Double;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Simplification\SpecialTypeAnnotation.cs (8)
14private static readonly ConcurrentDictionary<SpecialType, string> s_fromSpecialTypes = new(); 15private static readonly ConcurrentDictionary<string, SpecialType> s_toSpecialTypes = new(); 17public static SyntaxAnnotation Create(SpecialType specialType) 20public static SpecialType GetSpecialType(SyntaxAnnotation annotation) 23private static string CreateFromSpecialTypes(SpecialType arg) 26private static SpecialType CreateToSpecialTypes(string arg) 27=> (SpecialType)Enum.Parse(typeof(SpecialType), arg);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.NamedTypeSymbolKey.cs (1)
26visitor.WriteBoolean(symbol.SpecialType == SpecialType.System_IntPtr);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (6)
758&& symbol.ContainingType.SpecialType == SpecialType.System_Object 1017if (newReceiverType.SpecialType != SpecialType.None) 1024return newSymbolContainingType.SpecialType is SpecialType.System_Array or 1025SpecialType.System_Delegate or 1026SpecialType.System_Enum or 1027SpecialType.System_String;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (9)
58private static object CreateOne(SpecialType specialType) 61SpecialType.System_SByte => (sbyte)1, 62SpecialType.System_Byte => (byte)1, 63SpecialType.System_Int16 => (short)1, 64SpecialType.System_UInt16 => (ushort)1, 65SpecialType.System_Int32 => 1, 66SpecialType.System_UInt32 => (uint)1, 67SpecialType.System_Int64 => (long)1, 68SpecialType.System_UInt64 => (ulong)1,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IntegerUtilities.cs (7)
60public static long Convert(long v, SpecialType type) 63SpecialType.System_SByte => unchecked((sbyte)v), 64SpecialType.System_Byte => unchecked((byte)v), 65SpecialType.System_Int16 => unchecked((short)v), 66SpecialType.System_UInt16 => unchecked((ushort)v), 67SpecialType.System_Int32 => unchecked((int)v), 68SpecialType.System_UInt32 => unchecked((uint)v),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\IMethodSymbolExtensions.cs (2)
46method.Parameters is [{ Type.SpecialType: SpecialType.System_Object }, var secondParam] && 107methodSymbol.ReturnType.SpecialType == SpecialType.System_Int32 ||
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (1)
664ContainingType.SpecialType: SpecialType.System_Object,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (4)
512.Select(p => (p.Type ?? compilation.GetSpecialType(SpecialType.System_Object)).WithNullableAnnotation(p.NullableAnnotation)); 517types = types.Concat((method.ReturnType ?? compilation.GetSpecialType(SpecialType.System_Object)).WithNullableAnnotation(method.ReturnNullableAnnotation)); 680if (!returnType.GetMembers().OfType<IPropertySymbol>().Any(p => p.Name == WellKnownMemberNames.IsCompleted && p.Type.SpecialType == SpecialType.System_Boolean && p.GetMethod != null)) 730ReturnType.SpecialType: SpecialType.System_Boolean,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (56)
55=> symbol?.SpecialType == SpecialType.System_Void; 58=> symbol?.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T; 268case SpecialType.System_Array or SpecialType.System_ValueType: 271case SpecialType.System_Delegate: 272case SpecialType.System_MulticastDelegate: 273case SpecialType.System_Enum: 286case SpecialType.System_Byte: 287case SpecialType.System_SByte: 288case SpecialType.System_Int16: 289case SpecialType.System_UInt16: 290case SpecialType.System_Int32: 291case SpecialType.System_UInt32: 292case SpecialType.System_Int64: 293case SpecialType.System_UInt64: 294case SpecialType.System_Single: 295case SpecialType.System_Double: 296case SpecialType.System_Decimal: 297case SpecialType.System_IntPtr when type.IsNativeIntegerType: 298case SpecialType.System_UIntPtr when type.IsNativeIntegerType: 374case SpecialType.System_Object: 375case SpecialType.System_Void: 376case SpecialType.System_Boolean: 377case SpecialType.System_SByte: 378case SpecialType.System_Byte: 379case SpecialType.System_Decimal: 380case SpecialType.System_Single: 381case SpecialType.System_Double: 382case SpecialType.System_Int16: 383case SpecialType.System_Int32: 384case SpecialType.System_Int64: 385case SpecialType.System_Char: 386case SpecialType.System_String: 387case SpecialType.System_UInt16: 388case SpecialType.System_UInt32: 389case SpecialType.System_UInt64: 390case SpecialType.System_IntPtr when symbol.IsNativeIntegerType: 391case SpecialType.System_UIntPtr when symbol.IsNativeIntegerType: 402typeSymbol.AllInterfaces.Any(static i => i.SpecialType == SpecialType.System_Collections_IEnumerable) && 651case SpecialType.System_Boolean: 652case SpecialType.System_Char: 653case SpecialType.System_SByte: 654case SpecialType.System_Byte: 655case SpecialType.System_Int16: 656case SpecialType.System_UInt16: 657case SpecialType.System_Int32: 658case SpecialType.System_UInt32: 659case SpecialType.System_Int64: 660case SpecialType.System_UInt64: 661case SpecialType.System_Decimal: 662case SpecialType.System_Single: 663case SpecialType.System_Double: 666case SpecialType.System_IntPtr: 667case SpecialType.System_UIntPtr: 670case SpecialType.System_DateTime: 759namedType.OriginalDefinition.GetAttributes().Any(static a => a.AttributeClass?.SpecialType == SpecialType.System_Runtime_CompilerServices_InlineArrayAttribute);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\PredefinedTypeExtensions.cs (41)
13public static SpecialType ToSpecialType(this PredefinedType predefinedType) 16PredefinedType.Object => SpecialType.System_Object, 17PredefinedType.Void => SpecialType.System_Void, 18PredefinedType.Boolean => SpecialType.System_Boolean, 19PredefinedType.Char => SpecialType.System_Char, 20PredefinedType.SByte => SpecialType.System_SByte, 21PredefinedType.Byte => SpecialType.System_Byte, 22PredefinedType.Int16 => SpecialType.System_Int16, 23PredefinedType.UInt16 => SpecialType.System_UInt16, 24PredefinedType.Int32 => SpecialType.System_Int32, 25PredefinedType.UInt32 => SpecialType.System_UInt32, 26PredefinedType.Int64 => SpecialType.System_Int64, 27PredefinedType.UInt64 => SpecialType.System_UInt64, 28PredefinedType.Decimal => SpecialType.System_Decimal, 29PredefinedType.Single => SpecialType.System_Single, 30PredefinedType.Double => SpecialType.System_Double, 31PredefinedType.String => SpecialType.System_String, 32PredefinedType.DateTime => SpecialType.System_DateTime, 33PredefinedType.IntPtr => SpecialType.System_IntPtr, 34PredefinedType.UIntPtr => SpecialType.System_UIntPtr, 35_ => SpecialType.None, 38public static PredefinedType ToPredefinedType(this SpecialType specialType) 41SpecialType.System_Object => PredefinedType.Object, 42SpecialType.System_Void => PredefinedType.Void, 43SpecialType.System_Boolean => PredefinedType.Boolean, 44SpecialType.System_Char => PredefinedType.Char, 45SpecialType.System_SByte => PredefinedType.SByte, 46SpecialType.System_Byte => PredefinedType.Byte, 47SpecialType.System_Int16 => PredefinedType.Int16, 48SpecialType.System_UInt16 => PredefinedType.UInt16, 49SpecialType.System_Int32 => PredefinedType.Int32, 50SpecialType.System_UInt32 => PredefinedType.UInt32, 51SpecialType.System_Int64 => PredefinedType.Int64, 52SpecialType.System_UInt64 => PredefinedType.UInt64, 53SpecialType.System_Decimal => PredefinedType.Decimal, 54SpecialType.System_Single => PredefinedType.Single, 55SpecialType.System_Double => PredefinedType.Double, 56SpecialType.System_String => PredefinedType.String, 57SpecialType.System_DateTime => PredefinedType.DateTime, 58SpecialType.System_IntPtr => PredefinedType.IntPtr, 59SpecialType.System_UIntPtr => PredefinedType.UIntPtr,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.cs (1)
198=> symbol.IsKind(SymbolKind.NamedType, out ITypeSymbol? typeSymbol) && typeSymbol.SpecialType == SpecialType.System_Object;
Microsoft.CodeAnalysis.PublicApiAnalyzers.CodeFixes (4)
src\RoslynAnalyzers\Utilities\Workspaces\SyntaxGeneratorExtensions.cs (4)
330generator.TypeExpression(SpecialType.System_Boolean), 386generator.ParameterDeclaration(argumentName.ToString(), generator.TypeExpression(SpecialType.System_Object)) 388returnType: generator.TypeExpression(SpecialType.System_Boolean), 409returnType: generator.TypeExpression(SpecialType.System_Int32),
Microsoft.CodeAnalysis.ResxSourceGenerator (357)
src\Compilers\Core\Portable\SpecialTypeExtensions.cs (154)
17public static bool IsClrInteger(this SpecialType specialType) 21case SpecialType.System_Boolean: 22case SpecialType.System_Char: 23case SpecialType.System_Byte: 24case SpecialType.System_SByte: 25case SpecialType.System_Int16: 26case SpecialType.System_UInt16: 27case SpecialType.System_Int32: 28case SpecialType.System_UInt32: 29case SpecialType.System_Int64: 30case SpecialType.System_UInt64: 31case SpecialType.System_IntPtr: 32case SpecialType.System_UIntPtr: 42public static bool IsBlittable(this SpecialType specialType) 46case SpecialType.System_Boolean: 47case SpecialType.System_Char: 48case SpecialType.System_Byte: 49case SpecialType.System_SByte: 50case SpecialType.System_Int16: 51case SpecialType.System_UInt16: 52case SpecialType.System_Int32: 53case SpecialType.System_UInt32: 54case SpecialType.System_Int64: 55case SpecialType.System_UInt64: 56case SpecialType.System_Single: 57case SpecialType.System_Double: 64public static bool IsValueType(this SpecialType specialType) 68case SpecialType.System_Void: 69case SpecialType.System_Boolean: 70case SpecialType.System_Char: 71case SpecialType.System_Byte: 72case SpecialType.System_SByte: 73case SpecialType.System_Int16: 74case SpecialType.System_UInt16: 75case SpecialType.System_Int32: 76case SpecialType.System_UInt32: 77case SpecialType.System_Int64: 78case SpecialType.System_UInt64: 79case SpecialType.System_Single: 80case SpecialType.System_Double: 81case SpecialType.System_Decimal: 82case SpecialType.System_IntPtr: 83case SpecialType.System_UIntPtr: 84case SpecialType.System_Nullable_T: 85case SpecialType.System_DateTime: 86case SpecialType.System_TypedReference: 87case SpecialType.System_ArgIterator: 88case SpecialType.System_RuntimeArgumentHandle: 89case SpecialType.System_RuntimeFieldHandle: 90case SpecialType.System_RuntimeMethodHandle: 91case SpecialType.System_RuntimeTypeHandle: 98public static int SizeInBytes(this SpecialType specialType) 102case SpecialType.System_SByte: 104case SpecialType.System_Byte: 106case SpecialType.System_Int16: 108case SpecialType.System_UInt16: 110case SpecialType.System_Int32: 112case SpecialType.System_UInt32: 114case SpecialType.System_Int64: 116case SpecialType.System_UInt64: 118case SpecialType.System_Char: 120case SpecialType.System_Single: 122case SpecialType.System_Double: 124case SpecialType.System_Boolean: 127case SpecialType.System_Decimal: 141public static bool IsPrimitiveRecursiveStruct(this SpecialType specialType) 145case SpecialType.System_Boolean: 146case SpecialType.System_Byte: 147case SpecialType.System_Char: 148case SpecialType.System_Double: 149case SpecialType.System_Int16: 150case SpecialType.System_Int32: 151case SpecialType.System_Int64: 152case SpecialType.System_UInt16: 153case SpecialType.System_UInt32: 154case SpecialType.System_UInt64: 155case SpecialType.System_IntPtr: 156case SpecialType.System_UIntPtr: 157case SpecialType.System_SByte: 158case SpecialType.System_Single: 165public static bool IsValidEnumUnderlyingType(this SpecialType specialType) 169case SpecialType.System_Byte: 170case SpecialType.System_SByte: 171case SpecialType.System_Int16: 172case SpecialType.System_UInt16: 173case SpecialType.System_Int32: 174case SpecialType.System_UInt32: 175case SpecialType.System_Int64: 176case SpecialType.System_UInt64: 183public static bool IsNumericType(this SpecialType specialType) 187case SpecialType.System_Byte: 188case SpecialType.System_SByte: 189case SpecialType.System_Int16: 190case SpecialType.System_UInt16: 191case SpecialType.System_Int32: 192case SpecialType.System_UInt32: 193case SpecialType.System_Int64: 194case SpecialType.System_UInt64: 195case SpecialType.System_Single: 196case SpecialType.System_Double: 197case SpecialType.System_Decimal: 207public static bool IsIntegralType(this SpecialType specialType) 211case SpecialType.System_Byte: 212case SpecialType.System_SByte: 213case SpecialType.System_Int16: 214case SpecialType.System_UInt16: 215case SpecialType.System_Int32: 216case SpecialType.System_UInt32: 217case SpecialType.System_Int64: 218case SpecialType.System_UInt64: 225public static bool IsUnsignedIntegralType(this SpecialType specialType) 229case SpecialType.System_Byte: 230case SpecialType.System_UInt16: 231case SpecialType.System_UInt32: 232case SpecialType.System_UInt64: 239public static bool IsSignedIntegralType(this SpecialType specialType) 243case SpecialType.System_SByte: 244case SpecialType.System_Int16: 245case SpecialType.System_Int32: 246case SpecialType.System_Int64: 258public static int VBForToShiftBits(this SpecialType specialType) 262case SpecialType.System_SByte: 264case SpecialType.System_Int16: 266case SpecialType.System_Int32: 268case SpecialType.System_Int64: 275public static SpecialType FromRuntimeTypeOfLiteralValue(object value) 282return SpecialType.System_Int32; 287return SpecialType.System_String; 292return SpecialType.System_Boolean; 297return SpecialType.System_Char; 302return SpecialType.System_Int64; 307return SpecialType.System_Double; 312return SpecialType.System_UInt32; 317return SpecialType.System_UInt64; 322return SpecialType.System_Single; 327return SpecialType.System_Decimal; 332return SpecialType.System_Int16; 337return SpecialType.System_UInt16; 342return SpecialType.System_DateTime; 347return SpecialType.System_Byte; 352return SpecialType.System_SByte; 355return SpecialType.None; 365public static bool CanOptimizeBehavior(this SpecialType specialType) 366=> specialType is >= SpecialType.System_Object and <= SpecialType.System_Runtime_CompilerServices_InlineArrayAttribute; 371internal static ulong ConvertUnderlyingValueToUInt64(this SpecialType enumUnderlyingType, object value) 379SpecialType.System_SByte => (ulong)(sbyte)value, 380SpecialType.System_Int16 => (ulong)(short)value, 381SpecialType.System_Int32 => (ulong)(int)value, 382SpecialType.System_Int64 => (ulong)(long)value, 383SpecialType.System_Byte => (byte)value, 384SpecialType.System_UInt16 => (ushort)value, 385SpecialType.System_UInt32 => (uint)value, 386SpecialType.System_UInt64 => (ulong)value,
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (19)
340(binaryOperation.Type.SpecialType == SpecialType.System_Boolean && 374SpecialType.System_Boolean 375or SpecialType.System_Byte 376or SpecialType.System_Char 377or SpecialType.System_Double 378or SpecialType.System_Int16 379or SpecialType.System_Int32 380or SpecialType.System_Int64 381or SpecialType.System_UInt16 382or SpecialType.System_UInt32 383or SpecialType.System_UInt64 384or SpecialType.System_IntPtr 385or SpecialType.System_UIntPtr 386or SpecialType.System_SByte 387or SpecialType.System_Single 388or SpecialType.System_String 389or SpecialType.System_Object 390or SpecialType.System_ValueType 391or SpecialType.System_Void => true,
src\RoslynAnalyzers\Utilities\Compiler\DiagnosticHelpers.cs (11)
11public static bool TryConvertToUInt64(object? value, SpecialType specialType, out ulong convertedValue) 19case SpecialType.System_Int16: 23case SpecialType.System_Int32: 27case SpecialType.System_Int64: 31case SpecialType.System_UInt16: 35case SpecialType.System_UInt32: 39case SpecialType.System_UInt64: 43case SpecialType.System_Byte: 47case SpecialType.System_SByte: 51case SpecialType.System_Char: 55case SpecialType.System_Boolean:
src\RoslynAnalyzers\Utilities\Compiler\DoNotCatchGeneralUnlessRethrown.cs (1)
104compilation.GetSpecialType(SpecialType.System_Object),
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IMethodSymbolExtensions.cs (16)
31method.ReturnType.SpecialType == SpecialType.System_Boolean && 33method.Parameters[0].Type.SpecialType == SpecialType.System_Object && 43method.ContainingType.SpecialType == SpecialType.System_Object && 46method.ReturnType.SpecialType == SpecialType.System_Boolean && 48method.Parameters[0].Type.SpecialType == SpecialType.System_Object; 58method.ContainingType.SpecialType == SpecialType.System_Object && 60method.ReturnType.SpecialType == SpecialType.System_Boolean && 61method.Parameters[0].Type.SpecialType == SpecialType.System_Object && 62method.Parameters[1].Type.SpecialType == SpecialType.System_Object && 74if (overriddenMethod.ContainingType.SpecialType == SpecialType.System_Object) 189parameter.Type.SpecialType == SpecialType.System_Boolean && 238method.Parameters[0].Type.SpecialType == SpecialType.System_Boolean; 407method.Parameters[0].Type.SpecialType == SpecialType.System_Boolean && 421method.Parameters[1].Type.SpecialType == SpecialType.System_Boolean && 500method.Parameters[0].Type.SpecialType == SpecialType.System_Object; 540method.ReturnType.SpecialType == SpecialType.System_Boolean &&
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ITypeSymbolExtensions.cs (16)
22SpecialType.System_Boolean 23or SpecialType.System_Byte 24or SpecialType.System_Char 25or SpecialType.System_Double 26or SpecialType.System_Int16 27or SpecialType.System_Int32 28or SpecialType.System_Int64 29or SpecialType.System_UInt16 30or SpecialType.System_UInt32 31or SpecialType.System_UInt64 32or SpecialType.System_SByte 33or SpecialType.System_Single 34or SpecialType.System_String => true, 251=> typeSymbol.IsValueType || typeSymbol.SpecialType == SpecialType.System_String; 259=> typeSymbol != null && typeSymbol.IsValueType && typeSymbol.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T; 265=> typeSymbol.IsNullableValueType() && ((INamedTypeSymbol)typeSymbol).TypeArguments[0].SpecialType == SpecialType.System_Boolean;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (2)
157type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T || 174if (type.SpecialType == SpecialType.System_String)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SemanticFacts\ISemanticFactsExtensions.cs (2)
119=> type?.SpecialType is SpecialType.System_Single or SpecialType.System_Double;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Simplification\SpecialTypeAnnotation.cs (8)
14private static readonly ConcurrentDictionary<SpecialType, string> s_fromSpecialTypes = new(); 15private static readonly ConcurrentDictionary<string, SpecialType> s_toSpecialTypes = new(); 17public static SyntaxAnnotation Create(SpecialType specialType) 20public static SpecialType GetSpecialType(SyntaxAnnotation annotation) 23private static string CreateFromSpecialTypes(SpecialType arg) 26private static SpecialType CreateToSpecialTypes(string arg) 27=> (SpecialType)Enum.Parse(typeof(SpecialType), arg);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.NamedTypeSymbolKey.cs (1)
26visitor.WriteBoolean(symbol.SpecialType == SpecialType.System_IntPtr);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (6)
758&& symbol.ContainingType.SpecialType == SpecialType.System_Object 1017if (newReceiverType.SpecialType != SpecialType.None) 1024return newSymbolContainingType.SpecialType is SpecialType.System_Array or 1025SpecialType.System_Delegate or 1026SpecialType.System_Enum or 1027SpecialType.System_String;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (9)
58private static object CreateOne(SpecialType specialType) 61SpecialType.System_SByte => (sbyte)1, 62SpecialType.System_Byte => (byte)1, 63SpecialType.System_Int16 => (short)1, 64SpecialType.System_UInt16 => (ushort)1, 65SpecialType.System_Int32 => 1, 66SpecialType.System_UInt32 => (uint)1, 67SpecialType.System_Int64 => (long)1, 68SpecialType.System_UInt64 => (ulong)1,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IntegerUtilities.cs (7)
60public static long Convert(long v, SpecialType type) 63SpecialType.System_SByte => unchecked((sbyte)v), 64SpecialType.System_Byte => unchecked((byte)v), 65SpecialType.System_Int16 => unchecked((short)v), 66SpecialType.System_UInt16 => unchecked((ushort)v), 67SpecialType.System_Int32 => unchecked((int)v), 68SpecialType.System_UInt32 => unchecked((uint)v),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\IMethodSymbolExtensions.cs (2)
46method.Parameters is [{ Type.SpecialType: SpecialType.System_Object }, var secondParam] && 107methodSymbol.ReturnType.SpecialType == SpecialType.System_Int32 ||
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (1)
664ContainingType.SpecialType: SpecialType.System_Object,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (4)
512.Select(p => (p.Type ?? compilation.GetSpecialType(SpecialType.System_Object)).WithNullableAnnotation(p.NullableAnnotation)); 517types = types.Concat((method.ReturnType ?? compilation.GetSpecialType(SpecialType.System_Object)).WithNullableAnnotation(method.ReturnNullableAnnotation)); 680if (!returnType.GetMembers().OfType<IPropertySymbol>().Any(p => p.Name == WellKnownMemberNames.IsCompleted && p.Type.SpecialType == SpecialType.System_Boolean && p.GetMethod != null)) 730ReturnType.SpecialType: SpecialType.System_Boolean,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (56)
55=> symbol?.SpecialType == SpecialType.System_Void; 58=> symbol?.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T; 268case SpecialType.System_Array or SpecialType.System_ValueType: 271case SpecialType.System_Delegate: 272case SpecialType.System_MulticastDelegate: 273case SpecialType.System_Enum: 286case SpecialType.System_Byte: 287case SpecialType.System_SByte: 288case SpecialType.System_Int16: 289case SpecialType.System_UInt16: 290case SpecialType.System_Int32: 291case SpecialType.System_UInt32: 292case SpecialType.System_Int64: 293case SpecialType.System_UInt64: 294case SpecialType.System_Single: 295case SpecialType.System_Double: 296case SpecialType.System_Decimal: 297case SpecialType.System_IntPtr when type.IsNativeIntegerType: 298case SpecialType.System_UIntPtr when type.IsNativeIntegerType: 374case SpecialType.System_Object: 375case SpecialType.System_Void: 376case SpecialType.System_Boolean: 377case SpecialType.System_SByte: 378case SpecialType.System_Byte: 379case SpecialType.System_Decimal: 380case SpecialType.System_Single: 381case SpecialType.System_Double: 382case SpecialType.System_Int16: 383case SpecialType.System_Int32: 384case SpecialType.System_Int64: 385case SpecialType.System_Char: 386case SpecialType.System_String: 387case SpecialType.System_UInt16: 388case SpecialType.System_UInt32: 389case SpecialType.System_UInt64: 390case SpecialType.System_IntPtr when symbol.IsNativeIntegerType: 391case SpecialType.System_UIntPtr when symbol.IsNativeIntegerType: 402typeSymbol.AllInterfaces.Any(static i => i.SpecialType == SpecialType.System_Collections_IEnumerable) && 651case SpecialType.System_Boolean: 652case SpecialType.System_Char: 653case SpecialType.System_SByte: 654case SpecialType.System_Byte: 655case SpecialType.System_Int16: 656case SpecialType.System_UInt16: 657case SpecialType.System_Int32: 658case SpecialType.System_UInt32: 659case SpecialType.System_Int64: 660case SpecialType.System_UInt64: 661case SpecialType.System_Decimal: 662case SpecialType.System_Single: 663case SpecialType.System_Double: 666case SpecialType.System_IntPtr: 667case SpecialType.System_UIntPtr: 670case SpecialType.System_DateTime: 759namedType.OriginalDefinition.GetAttributes().Any(static a => a.AttributeClass?.SpecialType == SpecialType.System_Runtime_CompilerServices_InlineArrayAttribute);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\PredefinedTypeExtensions.cs (41)
13public static SpecialType ToSpecialType(this PredefinedType predefinedType) 16PredefinedType.Object => SpecialType.System_Object, 17PredefinedType.Void => SpecialType.System_Void, 18PredefinedType.Boolean => SpecialType.System_Boolean, 19PredefinedType.Char => SpecialType.System_Char, 20PredefinedType.SByte => SpecialType.System_SByte, 21PredefinedType.Byte => SpecialType.System_Byte, 22PredefinedType.Int16 => SpecialType.System_Int16, 23PredefinedType.UInt16 => SpecialType.System_UInt16, 24PredefinedType.Int32 => SpecialType.System_Int32, 25PredefinedType.UInt32 => SpecialType.System_UInt32, 26PredefinedType.Int64 => SpecialType.System_Int64, 27PredefinedType.UInt64 => SpecialType.System_UInt64, 28PredefinedType.Decimal => SpecialType.System_Decimal, 29PredefinedType.Single => SpecialType.System_Single, 30PredefinedType.Double => SpecialType.System_Double, 31PredefinedType.String => SpecialType.System_String, 32PredefinedType.DateTime => SpecialType.System_DateTime, 33PredefinedType.IntPtr => SpecialType.System_IntPtr, 34PredefinedType.UIntPtr => SpecialType.System_UIntPtr, 35_ => SpecialType.None, 38public static PredefinedType ToPredefinedType(this SpecialType specialType) 41SpecialType.System_Object => PredefinedType.Object, 42SpecialType.System_Void => PredefinedType.Void, 43SpecialType.System_Boolean => PredefinedType.Boolean, 44SpecialType.System_Char => PredefinedType.Char, 45SpecialType.System_SByte => PredefinedType.SByte, 46SpecialType.System_Byte => PredefinedType.Byte, 47SpecialType.System_Int16 => PredefinedType.Int16, 48SpecialType.System_UInt16 => PredefinedType.UInt16, 49SpecialType.System_Int32 => PredefinedType.Int32, 50SpecialType.System_UInt32 => PredefinedType.UInt32, 51SpecialType.System_Int64 => PredefinedType.Int64, 52SpecialType.System_UInt64 => PredefinedType.UInt64, 53SpecialType.System_Decimal => PredefinedType.Decimal, 54SpecialType.System_Single => PredefinedType.Single, 55SpecialType.System_Double => PredefinedType.Double, 56SpecialType.System_String => PredefinedType.String, 57SpecialType.System_DateTime => PredefinedType.DateTime, 58SpecialType.System_IntPtr => PredefinedType.IntPtr, 59SpecialType.System_UIntPtr => PredefinedType.UIntPtr,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.cs (1)
198=> symbol.IsKind(SymbolKind.NamedType, out ITypeSymbol? typeSymbol) && typeSymbol.SpecialType == SpecialType.System_Object;
Microsoft.CodeAnalysis.Scripting (38)
Hosting\ObjectFormatter\CommonPrimitiveFormatter.cs (18)
63case SpecialType.System_Int32: 66case SpecialType.System_String: 69case SpecialType.System_Boolean: 72case SpecialType.System_Char: 75case SpecialType.System_Int64: 78case SpecialType.System_Double: 81case SpecialType.System_Byte: 84case SpecialType.System_Decimal: 87case SpecialType.System_UInt32: 90case SpecialType.System_UInt64: 93case SpecialType.System_Single: 96case SpecialType.System_Int16: 99case SpecialType.System_UInt16: 102case SpecialType.System_DateTime: 105case SpecialType.System_SByte: 108case SpecialType.System_Object: 109case SpecialType.System_Void: 110case SpecialType.None:
Hosting\ObjectFormatter\CommonTypeNameFormatter.cs (1)
21protected abstract string GetPrimitiveTypeName(SpecialType type);
Hosting\ObjectFormatter\ObjectFormatterHelpers.cs (19)
275internal static SpecialType GetPrimitiveSpecialType(Type type) 281return SpecialType.System_Int32; 286return SpecialType.System_String; 291return SpecialType.System_Boolean; 296return SpecialType.System_Char; 301return SpecialType.System_Int64; 306return SpecialType.System_Double; 311return SpecialType.System_Byte; 316return SpecialType.System_Decimal; 321return SpecialType.System_UInt32; 326return SpecialType.System_UInt64; 331return SpecialType.System_Single; 336return SpecialType.System_Int16; 341return SpecialType.System_UInt16; 346return SpecialType.System_DateTime; 351return SpecialType.System_SByte; 356return SpecialType.System_Object; 361return SpecialType.System_Void; 364return SpecialType.None;
Microsoft.CodeAnalysis.Test.Utilities (20)
Compilation\ControlFlowGraphVerifier.cs (2)
916&& arguments[0].Value.Type.SpecialType == SpecialType.System_Int32 917&& arguments[1].Value.Type.SpecialType == SpecialType.System_Int32;
CompilationVerifier.cs (2)
595var corLibIdentity = _compilation.GetSpecialType(SpecialType.System_Object).ContainingAssembly.Identity; 953var corLibIdentity = compilation.GetSpecialType(SpecialType.System_Object).ContainingAssembly.Identity;
Diagnostics\CouldHaveMoreSpecificTypeAnalyzer.cs (2)
226return baseType.TypeKind == TypeKind.Class && baseType.SpecialType == SpecialType.System_Object; 266(targetTypeKind == TypeKind.Class && (sourceTypeKind == TypeKind.Structure || sourceTypeKind == TypeKind.Interface) && targetType.SpecialType == SpecialType.System_Object))
Diagnostics\LocalCouldBeConstAnalyzer.cs (2)
89if ((!localType.IsReferenceType || localType.SpecialType == SpecialType.System_String) && localType.SpecialType != SpecialType.None)
Diagnostics\OperationTestAnalyzer.cs (12)
159conditionRight.Type.SpecialType == SpecialType.System_Int32 && 176setupAssignment.Value.Type.SpecialType == SpecialType.System_Int32) 241advanceAssignment.Value.Type.SpecialType == SpecialType.System_Int32) 250advanceOperation.RightOperand.Type.SpecialType == SpecialType.System_Int32) 265advanceAssignment.Value.Type.SpecialType == SpecialType.System_Int32) 357singleValueExpression.Type.SpecialType == SpecialType.System_Int32) 377rangeMinExpression.Type.SpecialType == SpecialType.System_Int32 && 380rangeMaxExpression.Type.SpecialType == SpecialType.System_Int32) 400relationalValueExpression.Type.SpecialType == SpecialType.System_Int32) 587if (argumentValue.HasValue && argument.Type.SpecialType == SpecialType.System_Int32) 631if (literal.Type.SpecialType == SpecialType.System_Int32 && 1521if (binary.OperatorKind == BinaryOperatorKind.Multiply && binary.Type.SpecialType == SpecialType.System_Double)
Microsoft.CodeAnalysis.UnitTests (34)
CommonTypedConstantTests.cs (6)
30_intType = _compilation.GetSpecialType(SpecialType.System_Int32); 31_stringType = _compilation.GetSpecialType(SpecialType.System_String); 32_enumString1 = _compilation.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T).Construct(_compilation.GetSpecialType(SpecialType.System_String)); 33_enumString2 = _compilation.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T).Construct(_compilation.GetSpecialType(SpecialType.System_String));
CorLibTypesTests.cs (26)
26for (int i = 0; i <= (int)SpecialType.Count; i++) 28Cci.PrimitiveTypeCode code = SpecialTypes.GetTypeCode((SpecialType)i); 32Assert.Equal((SpecialType)i, SpecialTypes.GetTypeFromMetadataName(code)); 38SpecialType id = SpecialTypes.GetTypeFromMetadataName((Cci.PrimitiveTypeCode)i); 40if (id != SpecialType.None) 46Assert.Equal(SpecialType.System_Boolean, SpecialTypes.GetTypeFromMetadataName(Cci.PrimitiveTypeCode.Boolean)); 47Assert.Equal(SpecialType.System_Char, SpecialTypes.GetTypeFromMetadataName(Cci.PrimitiveTypeCode.Char)); 48Assert.Equal(SpecialType.System_Void, SpecialTypes.GetTypeFromMetadataName(Cci.PrimitiveTypeCode.Void)); 49Assert.Equal(SpecialType.System_String, SpecialTypes.GetTypeFromMetadataName(Cci.PrimitiveTypeCode.String)); 50Assert.Equal(SpecialType.System_Int64, SpecialTypes.GetTypeFromMetadataName(Cci.PrimitiveTypeCode.Int64)); 51Assert.Equal(SpecialType.System_Int32, SpecialTypes.GetTypeFromMetadataName(Cci.PrimitiveTypeCode.Int32)); 52Assert.Equal(SpecialType.System_Int16, SpecialTypes.GetTypeFromMetadataName(Cci.PrimitiveTypeCode.Int16)); 53Assert.Equal(SpecialType.System_SByte, SpecialTypes.GetTypeFromMetadataName(Cci.PrimitiveTypeCode.Int8)); 54Assert.Equal(SpecialType.System_UInt64, SpecialTypes.GetTypeFromMetadataName(Cci.PrimitiveTypeCode.UInt64)); 55Assert.Equal(SpecialType.System_UInt32, SpecialTypes.GetTypeFromMetadataName(Cci.PrimitiveTypeCode.UInt32)); 56Assert.Equal(SpecialType.System_UInt16, SpecialTypes.GetTypeFromMetadataName(Cci.PrimitiveTypeCode.UInt16)); 57Assert.Equal(SpecialType.System_Byte, SpecialTypes.GetTypeFromMetadataName(Cci.PrimitiveTypeCode.UInt8)); 58Assert.Equal(SpecialType.System_Single, SpecialTypes.GetTypeFromMetadataName(Cci.PrimitiveTypeCode.Float32)); 59Assert.Equal(SpecialType.System_Double, SpecialTypes.GetTypeFromMetadataName(Cci.PrimitiveTypeCode.Float64)); 60Assert.Equal(SpecialType.System_IntPtr, SpecialTypes.GetTypeFromMetadataName(Cci.PrimitiveTypeCode.IntPtr)); 61Assert.Equal(SpecialType.System_UIntPtr, SpecialTypes.GetTypeFromMetadataName(Cci.PrimitiveTypeCode.UIntPtr)); 72var knownMissingTypes = new HashSet<SpecialType>() 74SpecialType.System_Runtime_CompilerServices_InlineArrayAttribute 77for (var specialType = SpecialType.None + 1; specialType <= SpecialType.Count; specialType++)
Symbols\SpecialTypeTests.cs (2)
15AssertEx.Equal("0", ((ExtendedSpecialType)SpecialType.None).ToString()); 17AssertEx.Equal("System_Runtime_CompilerServices_InlineArrayAttribute", ((ExtendedSpecialType)SpecialType.Count).ToString());
Microsoft.CodeAnalysis.VisualBasic (1647)
Analysis\FlowAnalysis\AbstractFlowPass.vb (22)
334Case SpecialType.System_Void, 335SpecialType.System_Boolean, 336SpecialType.System_Char, 337SpecialType.System_SByte, 338SpecialType.System_Byte, 339SpecialType.System_Int16, 340SpecialType.System_UInt16, 341SpecialType.System_Int32, 342SpecialType.System_UInt32, 343SpecialType.System_Int64, 344SpecialType.System_UInt64, 345SpecialType.System_Decimal, 346SpecialType.System_Single, 347SpecialType.System_Double, 348SpecialType.System_DateTime, 349SpecialType.System_TypedReference, 350SpecialType.System_ArgIterator, 351SpecialType.System_RuntimeArgumentHandle, 352SpecialType.System_RuntimeFieldHandle, 353SpecialType.System_RuntimeMethodHandle, 354SpecialType.System_RuntimeTypeHandle 830Debug.Assert(node.ValueOpt IsNot Nothing OrElse node.HasErrors OrElse node.Type.SpecialType = SpecialType.System_Void)
Analysis\InitializerRewriter.vb (2)
213If expr.Type.SpecialType <> SpecialType.System_Void Then 227Debug.Assert(submissionResult.Type.SpecialType <> SpecialType.System_Void)
Binding\Binder.vb (6)
427Public Function GetSpecialType(typeId As SpecialType, node As SyntaxNodeOrToken, diagBag As BindingDiagnosticBag) As NamedTypeSymbol 432Public Shared Function GetSpecialType(compilation As VisualBasicCompilation, typeId As SpecialType, node As SyntaxNodeOrToken, diagBag As BindingDiagnosticBag) As NamedTypeSymbol 437Public Function GetSpecialType(typeId As SpecialType, node As SyntaxNodeOrToken, diagBag As BindingDiagnosticBag, ByRef reportedAnError As Boolean, suppressUseSiteError As Boolean) As NamedTypeSymbol 441Public Shared Function GetSpecialType(compilation As VisualBasicCompilation, typeId As SpecialType, node As SyntaxNodeOrToken, diagBag As BindingDiagnosticBag, ByRef reportedAnError As Boolean, suppressUseSiteError As Boolean) As NamedTypeSymbol 522If candidateProperty.Type.SpecialType <> SpecialType.System_String OrElse 536If parameterType.OriginalDefinition.SpecialType <> SpecialType.System_Collections_Generic_IEnumerable_T OrElse
Binding\Binder_AnonymousTypes.vb (1)
128Dim objectType As TypeSymbol = GetSpecialType(SpecialType.System_Object, initializerSyntax, diagnostics)
Binding\Binder_Attributes.vb (1)
798ReportDiagnostic(diagBag, conv.Operand.Syntax, ERRID.ERR_RequiredAttributeConstConversion2, If(conv.Operand.Type, _binder.Compilation.GetSpecialType(SpecialType.System_Object)), conv.Type)
Binding\Binder_Conversions.vb (30)
122(targetType.IsObjectType() OrElse targetType.SpecialType = SpecialType.System_ValueType) Then 249(targetType.IsObjectType() OrElse targetType.SpecialType = SpecialType.System_ValueType) Then 276Dim targetType As SpecialType 279Case SyntaxKind.CBoolKeyword : targetType = SpecialType.System_Boolean 280Case SyntaxKind.CByteKeyword : targetType = SpecialType.System_Byte 281Case SyntaxKind.CCharKeyword : targetType = SpecialType.System_Char 282Case SyntaxKind.CDateKeyword : targetType = SpecialType.System_DateTime 283Case SyntaxKind.CDecKeyword : targetType = SpecialType.System_Decimal 284Case SyntaxKind.CDblKeyword : targetType = SpecialType.System_Double 285Case SyntaxKind.CIntKeyword : targetType = SpecialType.System_Int32 286Case SyntaxKind.CLngKeyword : targetType = SpecialType.System_Int64 287Case SyntaxKind.CObjKeyword : targetType = SpecialType.System_Object 288Case SyntaxKind.CSByteKeyword : targetType = SpecialType.System_SByte 289Case SyntaxKind.CShortKeyword : targetType = SpecialType.System_Int16 290Case SyntaxKind.CSngKeyword : targetType = SpecialType.System_Single 291Case SyntaxKind.CStrKeyword : targetType = SpecialType.System_String 292Case SyntaxKind.CUIntKeyword : targetType = SpecialType.System_UInt32 293Case SyntaxKind.CULngKeyword : targetType = SpecialType.System_UInt64 294Case SyntaxKind.CUShortKeyword : targetType = SpecialType.System_UInt16 389Dim nullableOfT As NamedTypeSymbol = Compilation.GetSpecialType(SpecialType.System_Nullable_T) 390intermediateTargetType = Compilation.GetSpecialType(SpecialType.System_Nullable_T). 509(targetType.IsObjectType() OrElse targetType.SpecialType = SpecialType.System_ValueType) Then 711If targetGenericDefinition.SpecialType = SpecialType.System_Collections_Generic_IList_T OrElse 712targetGenericDefinition.SpecialType = SpecialType.System_Collections_Generic_ICollection_T OrElse 713targetGenericDefinition.SpecialType = SpecialType.System_Collections_Generic_IReadOnlyList_T OrElse 714targetGenericDefinition.SpecialType = SpecialType.System_Collections_Generic_IReadOnlyCollection_T OrElse 745Dim iEnumerable_T As NamedTypeSymbol = Compilation.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T) 996targetType.SpecialType <> SpecialType.System_MulticastDelegate) 1730If (targetType.SpecialType = SpecialType.System_String) AndAlso IsIEnumerableOfXElement(sourceType, useSiteInfo) Then 1775(targetElement.IsObjectType() OrElse targetElement.SpecialType = SpecialType.System_ValueType) AndAlso
Binding\Binder_Delegates.vb (2)
229If targetType.SpecialType = SpecialType.System_Delegate OrElse 230targetType.SpecialType = SpecialType.System_MulticastDelegate Then
Binding\Binder_Expressions.vb (36)
552expressionType = GetSpecialType(SpecialType.System_Object, expression.Syntax, diagnostics) 693If typeSym.IsArrayType AndAlso DirectCast(typeSym, ArrayTypeSymbol).ElementType.SpecialType = SpecialType.System_Void Then 765Return New BoundNameOfOperator(node, argument, ConstantValue.Create(value), GetSpecialType(SpecialType.System_String, node, diagnostics)) 778Dim resultType As TypeSymbol = GetSpecialType(SpecialType.System_Boolean, node, diagnostics) 803operand = ApplyImplicitConversion(node, GetSpecialType(SpecialType.System_Object, node.Expression, diagnostics), operand, diagnostics) 972resultType = GetSpecialType(SpecialType.System_Nullable_T, expr.Syntax, diagnostics).Construct(resultType) 1258(exprType IsNot Nothing AndAlso exprType.SpecialType = SpecialType.System_Void) Then 1439GetSpecialType(SpecialType.System_Object, expr.Syntax, diagnostics), Nothing) 1539(originalTargetType.SpecialType = SpecialType.System_Collections_Generic_IEnumerable_T OrElse 1540originalTargetType.SpecialType = SpecialType.System_Collections_Generic_IList_T OrElse 1541originalTargetType.SpecialType = SpecialType.System_Collections_Generic_ICollection_T OrElse 1542originalTargetType.SpecialType = SpecialType.System_Collections_Generic_IReadOnlyList_T OrElse 1543originalTargetType.SpecialType = SpecialType.System_Collections_Generic_IReadOnlyCollection_T) Then 1944dominantType = GetSpecialType(SpecialType.System_Object, node, diagnostics) 2011dominantType = If(boundFirstArg.Type, If(boundSecondArg.Type, GetSpecialType(SpecialType.System_Object, node, diagnostics))) 2483MemberLookup.GetTypeForIntrinsicAlias(name) <> SpecialType.None Then 3748GetSpecialType(SpecialType.System_String, node.Name, diagnostics))), 3765If type.SpecialType = SpecialType.System_Object OrElse type.IsExtensibleInterfaceNoUseSiteDiagnostics() Then 3767Dim arg = New BoundLiteral(name, ConstantValue.Create(node.Name.Identifier.ValueText), GetSpecialType(SpecialType.System_String, name, diagnostics)) 3786Dim arg = New BoundLiteral(name, ConstantValue.Create(node.Name.Identifier.ValueText), GetSpecialType(SpecialType.System_String, name, diagnostics)) 3803If type.SpecialType = SpecialType.System_Array Then 3829GetSpecialType(SpecialType.System_String, node.Name, diagnostics))), 3872Dim specialType As SpecialType = GetSpecialTypeForTypeCharacter(typeChar, typeCharacterString) 3895Dim specialType As SpecialType = GetSpecialTypeForTypeCharacter(typeChar, typeCharacterString) 3897If specialType <> specialType.None Then 3919Dim int32Type = GetSpecialType(SpecialType.System_Int32, node.ArgumentList, diagnostics) 4130Dim Int32Type = GetSpecialType(SpecialType.System_Int32, node, diagnostics) 4214inferredElementType = GetSpecialType(SpecialType.System_Object, node, diagnostics) 4346Dim int32Type = GetSpecialType(SpecialType.System_Int32, arrayBoundsOpt, diagnostics) 4461Dim specialType As SpecialType = SpecialTypeExtensions.FromRuntimeTypeOfLiteralValue(value) 4464Debug.Assert(specialType <> specialType.None AndAlso 4465specialType <> specialType.System_Byte AndAlso 4466specialType <> specialType.System_SByte) 4600Debug.Assert(dominantType.IsArrayType AndAlso DirectCast(dominantType, ArrayTypeSymbol).Rank = 1 AndAlso DirectCast(dominantType, ArrayTypeSymbol).ElementType.SpecialType = SpecialType.System_Object) 4606dominantType = GetSpecialType(SpecialType.System_Object, syntax, diagnostics) 4611dominantType = GetSpecialType(SpecialType.System_Object, syntax, diagnostics)
Binding\Binder_Initializers.vb (4)
159If fieldSymbol.Type.SpecialType = SpecialType.System_DateTime Then 164ElseIf fieldSymbol.Type.SpecialType = SpecialType.System_Decimal Then 214If expression.Type Is Nothing OrElse expression.Type.SpecialType <> SpecialType.System_Void Then 511Dim fieldType = If(fieldSymbol.HasDeclaredType, fieldSymbol.Type, GetSpecialType(SpecialType.System_Object, asNewSyntax, BindingDiagnosticBag.Discarded)) ' prevent recursion if field type is inferred.
Binding\Binder_InterpolatedString.vb (2)
32Return New BoundInterpolatedStringExpression(syntax, contentBuilder.ToImmutableAndFree(), constructionOpt:=Nothing, type:=GetSpecialType(SpecialType.System_String, syntax, diagnostics)) 77Debug.Assert(node.Type.SpecialType = SpecialType.System_String)
Binding\Binder_Invocation.vb (10)
338If target.Type.SpecialType = SpecialType.System_Object OrElse 339target.Type.SpecialType = SpecialType.System_Array Then 2719GetSpecialType(SpecialType.System_Int32, node, diagnostics)).MakeCompilerGenerated()}).AsImmutableOrNull(), 3178literal = New BoundLiteral(syntax, callerInfoValue, GetSpecialType(SpecialType.System_Int32, syntax, ignoreDiagnostics)) 3181literal = New BoundLiteral(syntax, callerInfoValue, GetSpecialType(SpecialType.System_String, syntax, ignoreDiagnostics)) 3219defaultConstantValue = ConstantValue.Default(SpecialType.System_Int32) 3222If paramNullableUnderlyingTypeOrSelf.GetEnumUnderlyingTypeOrSelf().SpecialType = SpecialType.System_Int32 Then 3225defaultArgumentType = GetSpecialType(SpecialType.System_Int32, syntax, diagnostics) 3228ElseIf defaultSpecialType <> SpecialType.None Then 3249If param.Type.SpecialType = SpecialType.System_Object Then
Binding\Binder_Lambda.vb (20)
61If originalRetTypeDef.SpecialType <> SpecialType.System_Collections_Generic_IEnumerable_T AndAlso 62originalRetTypeDef.SpecialType <> SpecialType.System_Collections_Generic_IEnumerator_T AndAlso 63returnType.SpecialType <> SpecialType.System_Collections_IEnumerable AndAlso 64returnType.SpecialType <> SpecialType.System_Collections_IEnumerator Then 73returnType = GetSpecialType(SpecialType.System_Void, node.SubOrFunctionHeader, diagnostics) 133objectType = GetSpecialType(SpecialType.System_Object, unboundParam.IdentifierSyntax, diagnostics) 172If target.ReturnType.SpecialType <> SpecialType.System_Void AndAlso 174Not ((source.Flags And SourceMemberFlags.Iterator) <> 0 AndAlso (target.ReturnType.SpecialType = SpecialType.System_Collections_IEnumerable OrElse 175target.ReturnType.SpecialType = SpecialType.System_Collections_IEnumerator)) Then 188If origTargetReturnType.SpecialType <> SpecialType.System_Collections_Generic_IEnumerable_T AndAlso 189origTargetReturnType.SpecialType <> SpecialType.System_Collections_Generic_IEnumerator_T Then 205Compilation.GetSpecialType(SpecialType.System_Void), ' No need to report use-site error. 289If source.ReturnType Is Nothing AndAlso target.ReturnType.SpecialType <> SpecialType.System_Void Then 773Dim targetSignature As New UnboundLambda.TargetSignature(ImmutableArray(Of ParameterSymbol).Empty, Compilation.GetSpecialType(SpecialType.System_Void), returnsByRef:=False) 850commonParameterTypes(i) = Compilation.GetSpecialType(SpecialType.System_Object) 863Compilation.GetSpecialType(SpecialType.System_Void), 925lambdaReturnType = GetSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T, source.Syntax, diagnostics). 926Construct(GetSpecialType(SpecialType.System_Object, source.Syntax, diagnostics)) 942lambdaReturnType = GetSpecialType(SpecialType.System_Object, source.Syntax, diagnostics) 997lambdaReturnType = GetSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T, source.Syntax, diagnostics).Construct(lambdaReturnType)
Binding\Binder_Latebound.vb (4)
60Dim objType = Me.GetSpecialType(SpecialType.System_Object, node, diagnostics) 165Dim objectType = GetSpecialType(SpecialType.System_Object, node, diagnostics) 183argument = omitted.Update(GetSpecialType(SpecialType.System_Object, argument.Syntax, diagnostics)) 227Dim objType = Me.GetSpecialType(SpecialType.System_Object, node, diagnostics)
Binding\Binder_Lookup.vb (21)
419If specialType <> specialType.None Then 448Public Shared Function GetTypeForIntrinsicAlias(possibleAlias As String) As SpecialType 453Return SpecialType.System_DateTime 455Return SpecialType.System_UInt16 457Return SpecialType.System_Int16 459Return SpecialType.System_UInt32 461Return SpecialType.System_Int32 463Return SpecialType.System_UInt64 465Return SpecialType.System_Int64 467Return SpecialType.None 832Return iFaceSpecial = SpecialType.System_Collections_Generic_IEnumerable_T OrElse 833iFaceSpecial = SpecialType.System_Collections_Generic_IList_T OrElse 834iFaceSpecial = SpecialType.System_Collections_Generic_ICollection_T OrElse 836iFaceSpecial = SpecialType.System_Collections_Generic_IReadOnlyList_T OrElse 837iFaceSpecial = SpecialType.System_Collections_Generic_IReadOnlyCollection_T OrElse 839iFaceSpecial = SpecialType.System_Collections_IEnumerable OrElse 1471Dim obj As NamedTypeSymbol = binder.SourceModule.ContainingAssembly.GetSpecialType(SpecialType.System_Object) 1928If container IsNot Nothing And container.SpecialType = SpecialType.System_Void Then 2006binder.SourceModule.ContainingAssembly.GetSpecialType(SpecialType.System_Object), 2163Return typeParameter.ContainingAssembly.GetSpecialType(If(typeParameter.HasValueTypeConstraint, SpecialType.System_ValueType, SpecialType.System_Object))
Binding\Binder_ObjectInitializer.vb (3)
674If initializedObjectType.SpecialType = SpecialType.System_Object OrElse initializedObjectType.IsErrorType Then 677If initializedObjectType.SpecialType = SpecialType.System_Object Then 872Dim ienumerable = GetSpecialType(SpecialType.System_Collections_IEnumerable,
Binding\Binder_Operators.vb (27)
75Dim booleanType = GetSpecialType(SpecialType.System_Boolean, node, diagnostics) 111GetSpecialType(SpecialType.System_Object, targetArgument.Syntax, diagnostics), 134GetSpecialType(SpecialType.System_Object, targetArgument.Syntax, diagnostics), 286Dim intrinsicOperatorType As SpecialType = SpecialType.None 333If intrinsicOperatorType = SpecialType.None Then 372Dim booleanType As TypeSymbol = GetSpecialTypeForBinaryOperator(node, leftType, rightType, SpecialType.System_Boolean, 484Dim rightTargetType As TypeSymbol = GetSpecialTypeForBinaryOperator(node, leftType, rightType, SpecialType.System_Int32, 821stringType = GetSpecialType(SpecialType.System_String, dbNullOperand.Syntax, diagnostics) 839specialType As SpecialType, 912If ofSpecialType <> SpecialType.None Then 1020Dim defaultRightSpecialType As SpecialType 1025defaultRightSpecialType = SpecialType.System_String 1029defaultRightSpecialType = SpecialType.System_Boolean 1049defaultRightSpecialType = SpecialType.System_Int32 1068Dim defaultLeftSpecialType As SpecialType = SpecialType.None 1082defaultLeftSpecialType = SpecialType.System_String 1088defaultLeftSpecialType = SpecialType.System_Int32 1091If defaultLeftSpecialType = SpecialType.None OrElse defaultLeftSpecialType = rightType.SpecialType Then 1122If leftType.SpecialType <> SpecialType.System_String Then 1123rightType = GetSpecialType(SpecialType.System_String, right.Syntax, diagnostics) 1143Dim int32Type = GetSpecialType(SpecialType.System_Int32, node.Operand, diagnostics) 1154Dim intrinsicOperatorType As SpecialType = SpecialType.None 1188If intrinsicOperatorType = SpecialType.None Then 1207If operandType.SpecialType = SpecialType.System_Object Then
Binding\Binder_Query.vb (5)
2330Dim boolSymbol As NamedTypeSymbol = GetSpecialType(SpecialType.System_Boolean, condition, diagnostics) 3469Dim intrinsicOperatorType As SpecialType = SpecialType.None 3482intrinsicOperatorType <> SpecialType.None Then 4389inferredType = GetSpecialType(SpecialType.System_Object, source.Syntax, additionalDiagnostics)
Binding\Binder_SelectCase.vb (14)
390Dim booleanType = GetSpecialType(SpecialType.System_Boolean, selectExpression.Syntax, diagnostics) 694Case SpecialType.System_Boolean, 695SpecialType.System_Byte, 696SpecialType.System_UInt16, 697SpecialType.System_UInt32, 698SpecialType.System_UInt64 701Case SpecialType.System_SByte, 702SpecialType.System_Int16, 703SpecialType.System_Int32, 704SpecialType.System_Int64, 705SpecialType.System_Char 708Case SpecialType.System_Single, 709SpecialType.System_Double 712Case SpecialType.System_Decimal
Binding\Binder_Statements.vb (40)
810target.Type.SpecialType <> SpecialType.System_Array AndAlso 811target.Type.SpecialType <> SpecialType.System_Object Then 1365If hasExplicitType AndAlso Not (symbol.IsConst AndAlso type.SpecialType = SpecialType.System_Object) Then 2207Dim int32 As NamedTypeSymbol = GetSpecialType(SpecialType.System_Int32, midExpression, diagnostics) 2219Dim stringType As NamedTypeSymbol = GetSpecialType(SpecialType.System_String, midExpression, diagnostics) 2264Compilation.GetSpecialType(SpecialType.System_Void), 2451Dim container = If(exprSymbol IsNot Nothing, exprSymbol.ContainingSymbol, Compilation.GetSpecialType(SpecialType.System_Object)) 2751GetSpecialType(SpecialType.System_Void, conditionalAccess.Syntax, diagnostics)) 3165Me.GetSpecialType(SpecialType.System_Int32, forStatement, diagnostics)) 3191Dim integerType = GetSpecialType(SpecialType.System_Int32, node, diagnostics) 3192Dim booleanType = GetSpecialType(SpecialType.System_Boolean, node, diagnostics) 3488Dim idisposableType = Compilation.GetSpecialType(SpecialType.System_IDisposable) 3504Debug.Assert(enumeratorType.SpecialType = SpecialType.System_Collections_IEnumerator) 3749Dim interfaceSpecialType As SpecialType = SpecialType.None 3771Dim genericIEnumerable = GetSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T, collectionSyntax, ienumerableUseSiteDiagnostics) 3806interfaceSpecialType = SpecialType.System_Collections_Generic_IEnumerable_T 3811Dim ienumerable = GetSpecialType(SpecialType.System_Collections_IEnumerable, collectionSyntax, ienumerableUseSiteDiagnostics) 3821interfaceSpecialType = SpecialType.System_Collections_IEnumerable 3872If interfaceSpecialType <> SpecialType.None Then 3879If interfaceSpecialType = SpecialType.System_Collections_Generic_IEnumerable_T Then 3939If interfaceSpecialType = SpecialType.System_Collections_Generic_IEnumerable_T Then 3983elementType = GetSpecialType(SpecialType.System_Char, collectionSyntax, diagnostics) 3989Dim idisposable = GetSpecialType(SpecialType.System_IDisposable, collectionSyntax, diagnostics) 4003getEnumeratorReturnType.SpecialType = SpecialType.System_Collections_IEnumerator Then 4165DirectCast(boundMoveNextCall, BoundCall).Method.OriginalDefinition.ReturnType.SpecialType <> SpecialType.System_Boolean Then 4355Dim valueTypeSymbol = interfaceType.ContainingAssembly.GetSpecialType(SpecialType.System_ValueType) 4446Dim iDisposable = GetSpecialType(SpecialType.System_IDisposable, 4952Dim boolSymbol As NamedTypeSymbol = GetSpecialType(SpecialType.System_Boolean, node, diagnostics) 4979Return Compilation.GetSpecialType(SpecialType.System_Void) 4983Return Compilation.GetSpecialType(SpecialType.System_Void) 5017If retType.SpecialType = SpecialType.System_Void Then 5023If(isAsync AndAlso Not methodReturnType.SpecialType = SpecialType.System_Void, ERRID.ERR_ReturnFromNonGenericTaskAsync, ERRID.ERR_ReturnFromNonFunction))) 5107Dim returnSpecialType As SpecialType = If(returnNamedType IsNot Nothing, returnNamedType.SpecialType, Nothing) 5109If returnSpecialType = SpecialType.System_Collections_Generic_IEnumerable_T OrElse 5110returnSpecialType = SpecialType.System_Collections_Generic_IEnumerator_T Then 5115If returnSpecialType = SpecialType.System_Collections_IEnumerable OrElse 5116returnSpecialType = SpecialType.System_Collections_IEnumerator Then 5118Return GetSpecialType(SpecialType.System_Object, node, diagnostics) 5236GetSpecialType(SpecialType.System_Int32, node.ErrorNumber, diagnostics),
Binding\Binder_Symbols.vb (18)
64If type.SpecialType = SpecialType.System_Void Then 765Dim type As SpecialType 768type = SpecialType.System_Object 770type = SpecialType.System_Boolean 772type = SpecialType.System_DateTime 774type = SpecialType.System_Char 776type = SpecialType.System_String 778type = SpecialType.System_Decimal 780type = SpecialType.System_Byte 782type = SpecialType.System_SByte 784type = SpecialType.System_UInt16 786type = SpecialType.System_Int16 788type = SpecialType.System_UInt32 790type = SpecialType.System_Int32 792type = SpecialType.System_UInt64 794type = SpecialType.System_Int64 796type = SpecialType.System_Single 798type = SpecialType.System_Double
Binding\Binder_Utils.vb (34)
295Dim nullableType As NamedTypeSymbol = DirectCast(GetSpecialType(SpecialType.System_Nullable_T, syntax, diagBag), NamedTypeSymbol) 673Dim specialType As SpecialType = GetSpecialTypeForTypeCharacter(identifier.GetTypeCharacter(), typeCharacterString) 695Return GetSpecialType(SpecialType.System_Object, identifier, diagBag) 699Public Shared Function GetSpecialTypeForTypeCharacter(typeChar As TypeCharacter, ByRef typeCharacterString As String) As SpecialType 700Dim specialType As SpecialType = SpecialType.None 704specialType = SpecialType.System_Decimal 707specialType = SpecialType.System_Decimal 710specialType = SpecialType.System_Double 713specialType = SpecialType.System_Double 716specialType = SpecialType.System_Int32 719specialType = SpecialType.System_Int32 722specialType = SpecialType.System_Int64 725specialType = SpecialType.System_Int64 728specialType = SpecialType.System_Int16 731specialType = SpecialType.System_Single 734specialType = SpecialType.System_Single 737specialType = SpecialType.System_String 740specialType = SpecialType.System_UInt32 743specialType = SpecialType.System_UInt64 746specialType = SpecialType.System_UInt16 1374Case SpecialType.System_Boolean, 1375SpecialType.System_Byte, 1376SpecialType.System_SByte, 1377SpecialType.System_Int16, 1378SpecialType.System_UInt16, 1379SpecialType.System_Int32, 1380SpecialType.System_UInt32, 1381SpecialType.System_Int64, 1382SpecialType.System_UInt64, 1383SpecialType.System_Single, 1384SpecialType.System_Double, 1385SpecialType.System_Char 1408If(operandType, GetSpecialType(SpecialType.System_Object, operand.Syntax, diagnostics)),
Binding\Binder_XmlLiterals.vb (7)
292Dim prefixesType = CreateArrayType(GetSpecialType(SpecialType.System_String, syntax, diagnostics)) 647If receiverType.SpecialType = SpecialType.System_Object Then 674memberAccess = BadExpression(syntax, ImmutableArray.Create(receiver, name), Compilation.GetSpecialType(SpecialType.System_String)) 697If receiverType.SpecialType = SpecialType.System_Object Then 797Return BadExpression(syntax, Compilation.GetSpecialType(SpecialType.System_String)) 903Dim result = BadExpression(syntax, Compilation.GetSpecialType(SpecialType.System_String)) 1057Dim result = New BoundLiteral(syntax, ConstantValue.Create(str), GetSpecialType(SpecialType.System_String, syntax, diagnostics), hasErrors:=hasErrors)
Binding\DocumentationCommentCrefBinder_Compat.vb (17)
351Dim type As SpecialType 354type = SpecialType.System_Object 356type = SpecialType.System_Boolean 358type = SpecialType.System_DateTime 360type = SpecialType.System_Char 362type = SpecialType.System_String 364type = SpecialType.System_Decimal 366type = SpecialType.System_Byte 368type = SpecialType.System_SByte 370type = SpecialType.System_UInt16 372type = SpecialType.System_Int16 374type = SpecialType.System_UInt32 376type = SpecialType.System_Int32 378type = SpecialType.System_UInt64 380type = SpecialType.System_Int64 382type = SpecialType.System_Single 384type = SpecialType.System_Double
Binding\ImplicitVariableBinder.vb (2)
157Dim localSpecialType As SpecialType = SpecialType.System_Object
Binding\SyntheticBoundTrees\SynthesizedPropertyAccessorBase.vb (4)
264accessor.ContainingAssembly.GetSpecialType(SpecialType.System_Object)), 266accessor.ContainingAssembly.GetSpecialType(SpecialType.System_Boolean))).MakeCompilerGenerated, 344accessor.ContainingAssembly.GetSpecialType(SpecialType.System_Object)), 346accessor.ContainingAssembly.GetSpecialType(SpecialType.System_Boolean))).MakeCompilerGenerated,
Binding\SyntheticBoundTrees\SynthesizedStringSwitchHashMethod.vb (4)
57Dim i As LocalSymbol = F.SynthesizedLocal(Me.ContainingAssembly.GetSpecialType(SpecialType.System_Int32)) 58Dim hashCode As LocalSymbol = F.SynthesizedLocal(Me.ContainingAssembly.GetSpecialType(SpecialType.System_UInt32)) 98F.Binary(BinaryOperatorKind.IsNot, Me.ContainingAssembly.GetSpecialType(SpecialType.System_Boolean), 119F.Binary(BinaryOperatorKind.LessThan, Me.ContainingAssembly.GetSpecialType(SpecialType.System_Boolean),
BoundTree\BoundAssignmentOperator.vb (2)
42left.GetPropertyOrXmlProperty().ContainingAssembly.GetSpecialType(SpecialType.System_Void), 44left.Type.ContainingAssembly.GetSpecialType(SpecialType.System_Void),
BoundTree\BoundExpressionExtensions.vb (6)
373If node.Value.Discriminator = ConstantValueTypeDiscriminator.Int32 AndAlso node.Type.SpecialType = SpecialType.System_Int32 Then 426Dim type As SpecialType = expression.Type.SpecialType 428Case SpecialType.System_Int16 431Case SpecialType.System_Int32 434Case SpecialType.System_Int64 456If type Is Nothing OrElse type.SpecialType = SpecialType.System_Object Then
BoundTree\BoundInterpolatedStringExpression.vb (1)
40Debug.Assert(Type.SpecialType = SpecialType.System_String)
BoundTree\BoundLocalDeclaration.vb (1)
43(LocalSymbol.IsConst AndAlso LocalSymbol.Type.SpecialType = SpecialType.System_Object AndAlso
BoundTree\BoundSequence.vb (1)
16Debug.Assert(Me.ValueOpt IsNot Nothing OrElse Me.HasErrors OrElse Me.Type.SpecialType = SpecialType.System_Void)
CodeGen\EmitConversion.vb (13)
203Debug.Assert(typeFrom.SpecialType = SpecialType.System_Object OrElse 204typeFrom.SpecialType = SpecialType.System_ValueType OrElse 205typeFrom.SpecialType = SpecialType.System_Enum OrElse 337If typeTo.SpecialType <> SpecialType.System_Object Then 379Debug.Assert(typeTo.SpecialType = SpecialType.System_Object OrElse 380typeTo.SpecialType = SpecialType.System_ValueType OrElse 381typeTo.SpecialType = SpecialType.System_Enum) 426Debug.Assert(typeFrom.SpecialType = SpecialType.System_Object OrElse 427typeFrom.SpecialType = SpecialType.System_ValueType OrElse 428typeFrom.SpecialType = SpecialType.System_Enum OrElse 509Debug.Assert(typeTo.SpecialType = SpecialType.System_Object OrElse 510typeTo.SpecialType = SpecialType.System_ValueType OrElse 511typeTo.SpecialType = SpecialType.System_Enum OrElse
CodeGen\EmitExpression.vb (10)
544Debug.Assert(sequence.ValueOpt IsNot Nothing OrElse sequence.Type.SpecialType = SpecialType.System_Void) 669If field.IsConst AndAlso specType <> SpecialType.System_Decimal AndAlso specType <> SpecialType.System_DateTime Then 1644Debug.Assert(expression.Type.SpecialType = SpecialType.System_Int32 OrElse expression.Type.SpecialType = SpecialType.System_Int64 OrElse expression.Type.SpecialType = SpecialType.System_UIntPtr) 1826If rightType.IsReferenceType OrElse (right.ConstantValueOpt IsNot Nothing AndAlso rightType.SpecialType <> SpecialType.System_Decimal) Then 2326Debug.Assert(node.Type.SpecialType = SpecialType.System_Int32) 2342Debug.Assert(node.Type.SpecialType = SpecialType.System_Int32) 2381Debug.Assert(node.Type.SpecialType = SpecialType.System_Int32)
CodeGen\EmitOperators.vb (10)
459Debug.Assert(binOp.Left.Type.SpecialType = SpecialType.System_Boolean) 460Debug.Assert(binOp.Right.Type.SpecialType = SpecialType.System_Boolean) 515Debug.Assert(binOp.Left.Type.SpecialType = SpecialType.System_Boolean) 516Debug.Assert(binOp.Right.Type.SpecialType = SpecialType.System_Boolean) 522Debug.Assert(binOp.Left.Type.SpecialType = SpecialType.System_Boolean) 523Debug.Assert(binOp.Right.Type.SpecialType = SpecialType.System_Boolean) 529Debug.Assert(binOp.Left.Type.SpecialType = SpecialType.System_Boolean) 530Debug.Assert(binOp.Right.Type.SpecialType = SpecialType.System_Boolean) 613Debug.Assert(condition.Type.SpecialType = SpecialType.System_Boolean) 643Debug.Assert(condition.Type.SpecialType = SpecialType.System_Boolean)
CodeGen\EmitStatement.vb (4)
815Debug.Assert(binOp.Left.IsNothingLiteral() OrElse binOp.Left.Type.SpecialType = SpecialType.System_Object OrElse binOp.WasCompilerGenerated) 816Debug.Assert(binOp.Right.IsNothingLiteral() OrElse binOp.Right.Type.SpecialType = SpecialType.System_Object OrElse binOp.WasCompilerGenerated) 1054If exprType.SpecialType <> SpecialType.System_String Then 1105Dim UInt32Type = DirectCast(_module.GetSpecialType(SpecialType.System_UInt32, syntaxNode, _diagnostics).GetInternalSymbol(), TypeSymbol)
CodeGen\ResumableStateMachineStateAllocator.vb (1)
87f.SpecialType(SpecialType.System_Boolean),
Compilation\ClsComplianceChecker.vb (8)
347Debug.Assert(baseType IsNot Nothing OrElse symbol.SpecialType = SpecialType.System_Object, "Only object has no base.") 440Debug.Assert(symbol.DelegateReturnType.SpecialType = SpecialType.System_Void) 630Case SpecialType.System_TypedReference, SpecialType.System_UIntPtr 632Case SpecialType.System_SByte, SpecialType.System_UInt16, SpecialType.System_UInt32, SpecialType.System_UInt64
Compilation\MethodCompiler.vb (2)
1919Dim objectType = constructor.ContainingAssembly.GetSpecialType(SpecialType.System_Object) 2084Dim voidType As NamedTypeSymbol = constructor.ContainingAssembly.GetSpecialType(SpecialType.System_Void)
Compilation\VisualBasicCompilation.vb (13)
848Return info.Type.SpecialType <> SpecialType.System_Void 853Return info.Type.SpecialType <> SpecialType.System_Void 1976Return GetSpecialType(SpecialType.System_Object) 2830Private Protected Overrides Function CommonGetSpecialType(specialType As SpecialType) As INamedTypeSymbolInternal 3007If returnType.SpecialType <> SpecialType.None AndAlso 3008leftType.SpecialType <> SpecialType.None AndAlso 3009rightType.SpecialType <> SpecialType.None Then 3012If resolved <> SpecialType.None Then 3018If resolved <> SpecialType.System_Object Then 3027resolved = SpecialType.System_Boolean 3074If returnType.SpecialType <> SpecialType.None AndAlso 3075operandType.SpecialType <> SpecialType.None Then 3082If resolved <> SpecialType.None AndAlso
Emit\EditAndContinue\PEDeltaAssemblyBuilder.vb (4)
73_deepTranslator = New VisualBasicSymbolMatcher.DeepTranslator(sourceAssembly.GetSpecialType(SpecialType.System_Object)) 208Debug.Assert(type.BaseTypeNoUseSiteDiagnostics.SpecialType = SpecialType.System_MulticastDelegate) 323Dim stringType = Compilation.GetSpecialType(SpecialType.System_String) 324Dim intType = Compilation.GetSpecialType(SpecialType.System_Int32)
Emit\EditAndContinue\VisualBasicSymbolMatcher.vb (1)
30_visitor = New Visitor(sourceAssembly, otherAssembly, synthesizedTypes, otherSynthesizedMembersOpt, otherDeletedMembersOpt, New DeepTranslator(otherAssembly.GetSpecialType(SpecialType.System_Object)))
Emit\NoPia\EmbeddedTypesManager.vb (3)
45Dim type = ModuleBeingBuilt.Compilation.GetSpecialType(SpecialType.System_String) 108ImmutableArray.Create(New TypedConstant(ctor.Parameters(0).Type, TypedConstantKind.Type, ctor.ContainingAssembly.GetSpecialType(SpecialType.System_Object))), 209If type.SpecialType <> SpecialType.None OrElse
Emit\PEModuleBuilder.vb (4)
592Friend NotOverridable Overrides Function GetSpecialType(specialType As SpecialType, syntaxNodeOpt As SyntaxNode, diagnostics As DiagnosticBag) As Cci.INamedTypeReference 599Private Function GetUntranslatedSpecialType(specialType As SpecialType, syntaxNodeOpt As SyntaxNode, diagnostics As DiagnosticBag) As NamedTypeSymbol 622Return namedType.SpecialType = CType(platformType, SpecialType) 757Return New SynthesizedPrivateImplementationDetailsSharedConstructor(SourceModule, GetPrivateImplClass(syntaxOpt, diagnostics), GetUntranslatedSpecialType(SpecialType.System_Void, syntaxOpt, diagnostics)).GetCciAdapter()
Emit\SymbolTranslator.vb (1)
216If declaredBase IsNot Nothing AndAlso declaredBase.SpecialType = SpecialType.System_ValueType Then
Emit\TypeParameterSymbolAdapter.vb (1)
205If t.SpecialType = SpecialType.System_ValueType Then
Lowering\AsyncRewriter\AsyncRewriter.AsyncMethodToClassRewriter.Await.vb (3)
78condition:=Me.F.Convert(Me.F.SpecialType(SpecialType.System_Boolean), rewrittenIsCompleted), 93If rewrittenType.SpecialType <> SpecialType.System_Void Then 120awaiterFieldType = Me.F.SpecialType(SpecialType.System_Object)
Lowering\AsyncRewriter\AsyncRewriter.AsyncMethodToClassRewriter.Expressions.vb (4)
157Me.F.SpecialType(SpecialType.System_Object))) 653Me.F.SpecialType(SpecialType.System_Object))) 728Me.F.SpecialType(SpecialType.System_Object))) 732Me.F.SpecialType(SpecialType.System_Object))))
Lowering\AsyncRewriter\AsyncRewriter.AsyncMethodToClassRewriter.Spilling.vb (24)
333Me.F.SpecialType(SpecialType.System_Object))) 345Me.F.SpecialType(SpecialType.System_Object))) 356Me.F.SpecialType(SpecialType.System_Object))) 479Case SpecialType.System_Void, 480SpecialType.System_Boolean, 481SpecialType.System_Char, 482SpecialType.System_SByte, 483SpecialType.System_Byte, 484SpecialType.System_Int16, 485SpecialType.System_UInt16, 486SpecialType.System_Int32, 487SpecialType.System_UInt32, 488SpecialType.System_Int64, 489SpecialType.System_UInt64, 490SpecialType.System_Decimal, 491SpecialType.System_Single, 492SpecialType.System_Double, 493SpecialType.System_IntPtr, 494SpecialType.System_UIntPtr, 495SpecialType.System_TypedReference, 496SpecialType.System_ArgIterator, 497SpecialType.System_RuntimeArgumentHandle 500Case SpecialType.System_Object, 501SpecialType.System_String
Lowering\AsyncRewriter\AsyncRewriter.vb (6)
53Me._resultType = Me.F.SpecialType(SpecialType.System_Void) 57Me._resultType = Me.F.SpecialType(SpecialType.System_Void) 136Me.StateField = Me.F.StateMachineField(Me.F.SpecialType(SpecialType.System_Int32), Me.Method, GeneratedNames.MakeStateMachineStateFieldName(), Accessibility.Public) 311EnsureSpecialType(SpecialType.System_Object, bag) 312EnsureSpecialType(SpecialType.System_Void, bag) 313EnsureSpecialType(SpecialType.System_ValueType, bag)
Lowering\AsyncRewriter\AsyncStateMachine.vb (2)
22asyncMethod.ContainingAssembly.GetSpecialType(If(typeKind = TypeKind.Struct, SpecialType.System_ValueType, SpecialType.System_Object)),
Lowering\ExpressionLambdaRewriter\ExpressionLambdaRewriter.vb (4)
81_int32Type = _factory.SpecialType(SpecialType.System_Int32) 90_objectType = _factory.SpecialType(SpecialType.System_Object) 692_factory.Convert(_factory.SpecialType(SpecialType.System_Collections_Generic_IEnumerable_T).Construct(_expressionType), 717If resultType.SpecialType = SpecialType.System_Int64 Then
Lowering\ExpressionLambdaRewriter\ExpressionLambdaRewriter_BinaryOperator.vb (18)
203Dim resultUnderlyingSpecialType As SpecialType = resultUnderlyingType.SpecialType 242Dim operandUnderlyingSpecialType As SpecialType = operandUnderlyingType.SpecialType 258Debug.Assert(operandUnderlyingSpecialType <> SpecialType.System_Object OrElse isIsIsNot) 261Debug.Assert(operandUnderlyingSpecialType <> SpecialType.System_String) 263If operandUnderlyingSpecialType = SpecialType.System_Decimal Then 265ElseIf operandUnderlyingSpecialType = SpecialType.System_DateTime Then 279If operandUnderlyingSpecialType = SpecialType.System_Boolean Then 337Dim resultUnderlyingSpecialType As SpecialType = resultUnderlyingType.SpecialType 352Dim systemBool As TypeSymbol = _factory.SpecialType(SpecialType.System_Boolean) 387Dim resultUnderlyingSpecialType As SpecialType = resultUnderlyingType.SpecialType 400If resultUnderlyingSpecialType = SpecialType.System_Object Then 405ElseIf resultUnderlyingSpecialType = SpecialType.System_Decimal Then 432Dim needToCastBackToByteOrSByte As Boolean = resultUnderlyingSpecialType = SpecialType.System_Byte OrElse 433resultUnderlyingSpecialType = SpecialType.System_SByte 458Debug.Assert(resultUnderlyingSpecialType = SpecialType.System_Byte OrElse resultUnderlyingSpecialType = SpecialType.System_SByte) 553Debug.Assert(conversion.Type.IsNullableType AndAlso conversion.Type.GetNullableUnderlyingType.SpecialType = SpecialType.System_Int32) 597Dim isInt32 As Boolean = shiftedType.GetNullableUnderlyingTypeOrSelf.SpecialType = SpecialType.System_Int32
Lowering\ExpressionLambdaRewriter\ExpressionLambdaRewriter_Conversion.vb (122)
241Return CreateTypeAs(If(typeTo.SpecialType = SpecialType.System_Object, 247Return ConvertIfNeeded(objectConversion, _factory.SpecialType(SpecialType.System_Object), typeTo, False) 258argumentType = _factory.SpecialType(SpecialType.System_String) 261argumentType = _factory.SpecialType(SpecialType.System_Object) 273Dim typeBeforeNegationIsByte As Boolean = typeBeforeNegation.SpecialType = SpecialType.System_SByte 276typeBeforeNegation = _factory.SpecialType(SpecialType.System_Int32) 311Case SpecialType.System_Byte 312Return Me._factory.SpecialType(SpecialType.System_SByte) 313Case SpecialType.System_UInt16 314Return Me._factory.SpecialType(SpecialType.System_Int16) 315Case SpecialType.System_UInt32 316Return Me._factory.SpecialType(SpecialType.System_Int32) 317Case SpecialType.System_UInt64 318Return Me._factory.SpecialType(SpecialType.System_Int64) 448Private Function GetConversionHelperMethod(stFrom As SpecialType, stTo As SpecialType) As MethodSymbol 453Case SpecialType.System_Boolean 455Case SpecialType.System_SByte : wellKnownHelper = WellKnownMember.System_Convert__ToBooleanInt32 456Case SpecialType.System_Byte : wellKnownHelper = WellKnownMember.System_Convert__ToBooleanInt32 457Case SpecialType.System_Int16 : wellKnownHelper = WellKnownMember.System_Convert__ToBooleanInt32 458Case SpecialType.System_UInt16 : wellKnownHelper = WellKnownMember.System_Convert__ToBooleanInt32 459Case SpecialType.System_Int32 : wellKnownHelper = WellKnownMember.System_Convert__ToBooleanInt32 460Case SpecialType.System_UInt32 : wellKnownHelper = WellKnownMember.System_Convert__ToBooleanUInt32 461Case SpecialType.System_Int64 : wellKnownHelper = WellKnownMember.System_Convert__ToBooleanInt64 462Case SpecialType.System_UInt64 : wellKnownHelper = WellKnownMember.System_Convert__ToBooleanUInt64 463Case SpecialType.System_Single : wellKnownHelper = WellKnownMember.System_Convert__ToBooleanSingle 464Case SpecialType.System_Double : wellKnownHelper = WellKnownMember.System_Convert__ToBooleanDouble 465Case SpecialType.System_Decimal : wellKnownHelper = WellKnownMember.System_Convert__ToBooleanDecimal 466Case SpecialType.System_String : wellKnownHelper = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToBooleanString 467Case SpecialType.System_Object : wellKnownHelper = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToBooleanObject 470Case SpecialType.System_Byte 472Case SpecialType.System_Double : wellKnownHelper = WellKnownMember.System_Convert__ToByteDouble 473Case SpecialType.System_Single : wellKnownHelper = WellKnownMember.System_Convert__ToByteSingle 474Case SpecialType.System_Decimal : specialHelper = SpecialMember.System_Decimal__op_Explicit_ToByte 475Case SpecialType.System_String : wellKnownHelper = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToByteString 476Case SpecialType.System_Object : wellKnownHelper = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToByteObject 479Case SpecialType.System_SByte 481Case SpecialType.System_Double : wellKnownHelper = WellKnownMember.System_Convert__ToSByteDouble 482Case SpecialType.System_Single : wellKnownHelper = WellKnownMember.System_Convert__ToSByteSingle 483Case SpecialType.System_Decimal : specialHelper = SpecialMember.System_Decimal__op_Explicit_ToSByte 484Case SpecialType.System_String : wellKnownHelper = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToSByteString 485Case SpecialType.System_Object : wellKnownHelper = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToSByteObject 488Case SpecialType.System_Int16 490Case SpecialType.System_Double : wellKnownHelper = WellKnownMember.System_Convert__ToInt16Double 491Case SpecialType.System_Single : wellKnownHelper = WellKnownMember.System_Convert__ToInt16Single 492Case SpecialType.System_Decimal : specialHelper = SpecialMember.System_Decimal__op_Explicit_ToInt16 493Case SpecialType.System_String : wellKnownHelper = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToShortString 494Case SpecialType.System_Object : wellKnownHelper = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToShortObject 497Case SpecialType.System_UInt16 499Case SpecialType.System_Double : wellKnownHelper = WellKnownMember.System_Convert__ToUInt16Double 500Case SpecialType.System_Single : wellKnownHelper = WellKnownMember.System_Convert__ToUInt16Single 501Case SpecialType.System_Decimal : specialHelper = SpecialMember.System_Decimal__op_Explicit_ToUInt16 502Case SpecialType.System_String : wellKnownHelper = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToUShortString 503Case SpecialType.System_Object : wellKnownHelper = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToUShortObject 506Case SpecialType.System_Int32 508Case SpecialType.System_Double : wellKnownHelper = WellKnownMember.System_Convert__ToInt32Double 509Case SpecialType.System_Single : wellKnownHelper = WellKnownMember.System_Convert__ToInt32Single 510Case SpecialType.System_Decimal : specialHelper = SpecialMember.System_Decimal__op_Explicit_ToInt32 511Case SpecialType.System_String : wellKnownHelper = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToIntegerString 512Case SpecialType.System_Object : wellKnownHelper = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToIntegerObject 515Case SpecialType.System_UInt32 517Case SpecialType.System_Double : wellKnownHelper = WellKnownMember.System_Convert__ToUInt32Double 518Case SpecialType.System_Single : wellKnownHelper = WellKnownMember.System_Convert__ToUInt32Single 519Case SpecialType.System_Decimal : specialHelper = SpecialMember.System_Decimal__op_Explicit_ToUInt32 520Case SpecialType.System_String : wellKnownHelper = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToUIntegerString 521Case SpecialType.System_Object : wellKnownHelper = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToUIntegerObject 524Case SpecialType.System_Int64 526Case SpecialType.System_Double : wellKnownHelper = WellKnownMember.System_Convert__ToInt64Double 527Case SpecialType.System_Single : wellKnownHelper = WellKnownMember.System_Convert__ToInt64Single 528Case SpecialType.System_Decimal : specialHelper = SpecialMember.System_Decimal__op_Explicit_ToInt64 529Case SpecialType.System_String : wellKnownHelper = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToLongString 530Case SpecialType.System_Object : wellKnownHelper = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToLongObject 533Case SpecialType.System_UInt64 535Case SpecialType.System_Double : wellKnownHelper = WellKnownMember.System_Convert__ToUInt64Double 536Case SpecialType.System_Single : wellKnownHelper = WellKnownMember.System_Convert__ToUInt64Single 537Case SpecialType.System_Decimal : specialHelper = SpecialMember.System_Decimal__op_Explicit_ToUInt64 538Case SpecialType.System_String : wellKnownHelper = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToULongString 539Case SpecialType.System_Object : wellKnownHelper = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToULongObject 542Case SpecialType.System_Decimal 544Case SpecialType.System_SByte : specialHelper = SpecialMember.System_Decimal__op_Implicit_FromInt32 545Case SpecialType.System_Byte : specialHelper = SpecialMember.System_Decimal__op_Implicit_FromInt32 546Case SpecialType.System_Int16 : specialHelper = SpecialMember.System_Decimal__op_Implicit_FromInt32 547Case SpecialType.System_UInt16 : specialHelper = SpecialMember.System_Decimal__op_Implicit_FromInt32 548Case SpecialType.System_Int32 : specialHelper = SpecialMember.System_Decimal__op_Implicit_FromInt32 549Case SpecialType.System_UInt32 : specialHelper = SpecialMember.System_Decimal__op_Implicit_FromUInt32 550Case SpecialType.System_Int64 : specialHelper = SpecialMember.System_Decimal__op_Implicit_FromInt64 551Case SpecialType.System_UInt64 : specialHelper = SpecialMember.System_Decimal__op_Implicit_FromUInt64 552Case SpecialType.System_Single : specialHelper = SpecialMember.System_Decimal__op_Explicit_FromSingle 553Case SpecialType.System_Double : specialHelper = SpecialMember.System_Decimal__op_Explicit_FromDouble 554Case SpecialType.System_Boolean : wellKnownHelper = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToDecimalBoolean 555Case SpecialType.System_String : wellKnownHelper = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToDecimalString 556Case SpecialType.System_Object : wellKnownHelper = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToDecimalObject 559Case SpecialType.System_Single 561Case SpecialType.System_Decimal : specialHelper = SpecialMember.System_Decimal__op_Explicit_ToSingle 562Case SpecialType.System_String : wellKnownHelper = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToSingleString 563Case SpecialType.System_Object : wellKnownHelper = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToSingleObject 566Case SpecialType.System_Double 568Case SpecialType.System_Decimal : specialHelper = SpecialMember.System_Decimal__op_Explicit_ToDouble 569Case SpecialType.System_String : wellKnownHelper = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToDoubleString 570Case SpecialType.System_Object : wellKnownHelper = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToDoubleObject 573Case SpecialType.System_Char 575Case SpecialType.System_String : wellKnownHelper = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToCharString 576Case SpecialType.System_Object : wellKnownHelper = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToCharObject 579Case SpecialType.System_String 581Case SpecialType.System_Boolean : wellKnownHelper = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToStringBoolean 582Case SpecialType.System_SByte, 583SpecialType.System_Int16, 584SpecialType.System_Int32 : wellKnownHelper = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToStringInt32 586Case SpecialType.System_Byte : wellKnownHelper = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToStringByte 588Case SpecialType.System_UInt16, 589SpecialType.System_UInt32 : wellKnownHelper = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToStringUInt32 591Case SpecialType.System_Int64 : wellKnownHelper = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToStringInt64 592Case SpecialType.System_UInt64 : wellKnownHelper = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToStringUInt64 593Case SpecialType.System_Single : wellKnownHelper = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToStringSingle 594Case SpecialType.System_Double : wellKnownHelper = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToStringDouble 595Case SpecialType.System_Decimal : wellKnownHelper = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToStringDecimal 596Case SpecialType.System_DateTime : wellKnownHelper = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToStringDateTime 597Case SpecialType.System_Char : wellKnownHelper = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToStringChar 598Case SpecialType.System_Object : wellKnownHelper = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToStringObject 601Case SpecialType.System_DateTime 603Case SpecialType.System_String : wellKnownHelper = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToDateString 604Case SpecialType.System_Object : wellKnownHelper = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToDateObject
Lowering\ExpressionLambdaRewriter\ExpressionLambdaRewriter_UnaryOperator.vb (3)
26Dim origArgUnderlyingSpecialType As SpecialType = origArgUnderlyingType.SpecialType 86Dim needToCastBackToByteOrSByte As Boolean = origArgUnderlyingSpecialType = SpecialType.System_Byte OrElse 87origArgUnderlyingSpecialType = SpecialType.System_SByte
Lowering\Instrumentation\CodeCoverageInstrumenter.vb (3)
119Dim payloadElementType As TypeSymbol = methodBodyFactory.SpecialType(SpecialType.System_Boolean) 216methodBodyFactory.SpecialType(SpecialType.System_Int32), fileIndices.ToImmutable()) 285_methodBodyFactory.SpecialType(SpecialType.System_Boolean),
Lowering\IteratorRewriter\IteratorRewriter.vb (16)
37Me._elementType = method.ContainingAssembly.GetSpecialType(SpecialType.System_Object) 63Dim isEnumerable As Boolean = retSpecialType = SpecialType.System_Collections_Generic_IEnumerable_T OrElse 64retSpecialType = SpecialType.System_Collections_IEnumerable 68elementType = method.ContainingAssembly.GetSpecialType(SpecialType.System_Object) 103EnsureSpecialType(SpecialType.System_Object, bag) 104EnsureSpecialType(SpecialType.System_Boolean, bag) 105EnsureSpecialType(SpecialType.System_Int32, bag) 106EnsureSpecialType(SpecialType.System_IDisposable, bag) 110EnsureSpecialType(SpecialType.System_Collections_IEnumerator, bag) 116EnsureSpecialType(SpecialType.System_Collections_Generic_IEnumerator_T, bag) 120EnsureSpecialType(SpecialType.System_Collections_IEnumerable, bag) 122EnsureSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T, bag) 139Me.StateField = Me.F.StateMachineField(Me.F.SpecialType(SpecialType.System_Int32), Me.Method, GeneratedNames.MakeStateMachineStateFieldName(), Accessibility.Public) 146F.StateMachineField(F.SpecialType(SpecialType.System_Int32), Me.Method, GeneratedNames.MakeIteratorInitialThreadIdName(), Accessibility.Public), 181Dim getEnumeratorGeneric = Me.OpenMethodImplementation(F.SpecialType(SpecialType.System_Collections_Generic_IEnumerable_T).Construct(_elementType), 275Me.OpenPropertyImplementation(F.SpecialType(SpecialType.System_Collections_Generic_IEnumerator_T).Construct(_elementType),
Lowering\IteratorRewriter\IteratorStateMachine.vb (7)
29iteratorMethod.ContainingAssembly.GetSpecialType(SpecialType.System_Object), 34Dim intType = DeclaringCompilation.GetSpecialType(SpecialType.System_Int32) 51interfaces.Add(containingAssembly.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T).Construct(elementType)) 52interfaces.Add(containingAssembly.GetSpecialType(SpecialType.System_Collections_IEnumerable)) 55interfaces.Add(containingAssembly.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerator_T).Construct(elementType)) 56interfaces.Add(containingAssembly.GetSpecialType(SpecialType.System_IDisposable)) 57interfaces.Add(containingAssembly.GetSpecialType(SpecialType.System_Collections_IEnumerator))
Lowering\LambdaRewriter\LambdaFrame.vb (2)
185Dim type = ContainingAssembly.GetSpecialType(SpecialType.System_Object) 197Dim type = ContainingAssembly.GetSpecialType(SpecialType.System_Object)
Lowering\LambdaRewriter\LambdaRewriter.vb (2)
450Dim bool = frame.ContainingAssembly.GetSpecialType(SpecialType.System_Boolean) 454Dim obj = frame.ContainingAssembly.GetSpecialType(SpecialType.System_Object)
Lowering\LocalRewriter\LocalRewriter.vb (3)
559Private Function GetSpecialType(specialType As SpecialType) As NamedTypeSymbol 565Private Function GetSpecialTypeWithUseSiteDiagnostics(specialType As SpecialType, syntax As SyntaxNode) As NamedTypeSymbol 772If type.SpecialType = SpecialType.System_Void Then
Lowering\LocalRewriter\LocalRewriter_BinaryOperators.vb (4)
483Debug.Assert(memberSymbol.ReturnType.SpecialType = SpecialType.System_Int32) 522Debug.Assert(memberSymbol.ReturnType.SpecialType = SpecialType.System_Int32) 694Debug.Assert(memberSymbol.ReturnType.SpecialType = SpecialType.System_Int32) 760Debug.Assert(memberSymbol.Parameters(2).Type.GetEnumUnderlyingTypeOrSelf().SpecialType = SpecialType.System_Int32)
Lowering\LocalRewriter\LocalRewriter_Constant.vb (2)
47currentMethod.ContainingType.SpecialType <> SpecialType.System_Decimal Then 147currentMethod.ContainingType.SpecialType <> SpecialType.System_DateTime) Then
Lowering\LocalRewriter\LocalRewriter_Conversion.vb (70)
318node.Type.SpecialType <> SpecialType.System_MulticastDelegate) 777result = RewriteFromObjectConversion(rewrittenConversion, Compilation.GetSpecialType(SpecialType.System_Object), underlyingTypeTo) 839Case SpecialType.System_Boolean : member = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToBooleanObject 840Case SpecialType.System_SByte : member = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToSByteObject 841Case SpecialType.System_Byte : member = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToByteObject 842Case SpecialType.System_Int16 : member = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToShortObject 843Case SpecialType.System_UInt16 : member = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToUShortObject 844Case SpecialType.System_Int32 : member = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToIntegerObject 845Case SpecialType.System_UInt32 : member = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToUIntegerObject 846Case SpecialType.System_Int64 : member = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToLongObject 847Case SpecialType.System_UInt64 : member = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToULongObject 848Case SpecialType.System_Single : member = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToSingleObject 849Case SpecialType.System_Double : member = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToDoubleObject 850Case SpecialType.System_Decimal : member = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToDecimalObject 851Case SpecialType.System_DateTime : member = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToDateObject 852Case SpecialType.System_Char : member = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToCharObject 853Case SpecialType.System_String : member = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToStringObject 929Case SpecialType.System_Boolean : member = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToStringBoolean 930Case SpecialType.System_SByte, 931SpecialType.System_Int16, 932SpecialType.System_Int32 : member = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToStringInt32 934Case SpecialType.System_Byte : member = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToStringByte 936Case SpecialType.System_UInt16, 937SpecialType.System_UInt32 : member = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToStringUInt32 939Case SpecialType.System_Int64 : member = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToStringInt64 940Case SpecialType.System_UInt64 : member = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToStringUInt64 941Case SpecialType.System_Single : member = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToStringSingle 942Case SpecialType.System_Double : member = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToStringDouble 943Case SpecialType.System_Decimal : member = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToStringDecimal 944Case SpecialType.System_DateTime : member = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToStringDateTime 945Case SpecialType.System_Char : member = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToStringChar 1004Case SpecialType.System_Boolean : member = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToBooleanString 1005Case SpecialType.System_SByte : member = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToSByteString 1006Case SpecialType.System_Byte : member = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToByteString 1007Case SpecialType.System_Int16 : member = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToShortString 1008Case SpecialType.System_UInt16 : member = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToUShortString 1009Case SpecialType.System_Int32 : member = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToIntegerString 1010Case SpecialType.System_UInt32 : member = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToUIntegerString 1011Case SpecialType.System_Int64 : member = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToLongString 1012Case SpecialType.System_UInt64 : member = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToULongString 1013Case SpecialType.System_Single : member = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToSingleString 1014Case SpecialType.System_Double : member = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToDoubleString 1015Case SpecialType.System_Decimal : member = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToDecimalString 1016Case SpecialType.System_DateTime : member = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToDateString 1017Case SpecialType.System_Char : member = WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToCharString 1073Case SpecialType.System_SByte, 1074SpecialType.System_Byte, 1075SpecialType.System_Int16, 1076SpecialType.System_UInt16, 1077SpecialType.System_Int32 : member = SpecialMember.System_Decimal__CtorInt32 1078Case SpecialType.System_UInt32 : member = SpecialMember.System_Decimal__CtorUInt32 1079Case SpecialType.System_Int64 : member = SpecialMember.System_Decimal__CtorInt64 1080Case SpecialType.System_UInt64 : member = SpecialMember.System_Decimal__CtorUInt64 1081Case SpecialType.System_Single : member = SpecialMember.System_Decimal__CtorSingle 1082Case SpecialType.System_Double : member = SpecialMember.System_Decimal__CtorDouble 1144Case SpecialType.System_Boolean : member = WellKnownMember.System_Convert__ToBooleanDecimal 1145Case SpecialType.System_SByte : member = WellKnownMember.System_Convert__ToSByteDecimal 1146Case SpecialType.System_Byte : member = WellKnownMember.System_Convert__ToByteDecimal 1147Case SpecialType.System_Int16 : member = WellKnownMember.System_Convert__ToInt16Decimal 1148Case SpecialType.System_UInt16 : member = WellKnownMember.System_Convert__ToUInt16Decimal 1149Case SpecialType.System_Int32 : member = WellKnownMember.System_Convert__ToInt32Decimal 1150Case SpecialType.System_UInt32 : member = WellKnownMember.System_Convert__ToUInt32Decimal 1151Case SpecialType.System_Int64 : member = WellKnownMember.System_Convert__ToInt64Decimal 1152Case SpecialType.System_UInt64 : member = WellKnownMember.System_Convert__ToUInt64Decimal 1153Case SpecialType.System_Single : member = WellKnownMember.System_Convert__ToSingleDecimal 1154Case SpecialType.System_Double : member = WellKnownMember.System_Convert__ToDoubleDecimal 1249Case SpecialType.System_Single 1251Case SpecialType.System_Double 1268Case SpecialType.System_Single 1270Case SpecialType.System_Double
Lowering\LocalRewriter\LocalRewriter_ForEach.vb (9)
209Debug.Assert(collectionExpression.Type.SpecialType = SpecialType.System_String OrElse 242Dim integerType = GetSpecialTypeWithUseSiteDiagnostics(SpecialType.System_Int32, syntaxNode) 245ConstantValue.Default(SpecialType.System_Int32), 286elementType = GetSpecialType(SpecialType.System_Char) 366Debug.Assert(expressionType.SpecialType <> SpecialType.System_Object) 397Debug.Assert(expressionType.SpecialType <> SpecialType.System_Object) 465Dim booleanType = GetSpecialTypeWithUseSiteDiagnostics(SpecialType.System_Boolean, statementSyntax) 592Debug.Assert(enumeratorInfo.MoveNext.Type.SpecialType = SpecialType.System_Boolean) 724Dim voidType = GetSpecialTypeWithUseSiteDiagnostics(SpecialType.System_Void, syntaxNode)
Lowering\LocalRewriter\LocalRewriter_ForTo.vb (7)
141type:=GetSpecialType(SpecialType.System_Boolean))) 416Debug.Assert(Compilation.GetSpecialType(SpecialType.System_Object) Is rewrittenControlVariable.Type) 445Compilation.GetSpecialType(SpecialType.System_Boolean), 449arguments, Compilation.GetSpecialType(SpecialType.System_Boolean), hasErrors:=True) 500Compilation.GetSpecialType(SpecialType.System_Boolean), 504arguments, Compilation.GetSpecialType(SpecialType.System_Boolean), hasErrors:=True) 679Dim booleanType = GetSpecialType(SpecialType.System_Boolean)
Lowering\LocalRewriter\LocalRewriter_InterpolatedString.vb (1)
19Debug.Assert(node.Type.SpecialType = SpecialType.System_String)
Lowering\LocalRewriter\LocalRewriter_LateBindingHelpers.vb (13)
70Dim intType = Me.GetSpecialType(SpecialType.System_Int32) 110Dim intType = Me.GetSpecialType(SpecialType.System_Int32) 199Dim intType = Me.GetSpecialType(SpecialType.System_Int32) 266Dim intType = Me.GetSpecialType(SpecialType.System_Int32) 324Dim intType = Me.GetSpecialType(SpecialType.System_Int32) 341Dim intType = Me.GetSpecialType(SpecialType.System_Int32) 398Me.GetSpecialType(SpecialType.System_Void)) 457Me.GetSpecialType(SpecialType.System_Void)) 531Return New BoundSequence(syntax, ImmutableArray(Of LocalSymbol).Empty, ImmutableArray.Create(Of BoundExpression)(memberAccess), Nothing, Me.GetSpecialType(SpecialType.System_Void)) 536Return New BoundSequence(syntax, ImmutableArray(Of LocalSymbol).Empty, ImmutableArray.Create(Of BoundExpression)(memberAccess), Nothing, Me.GetSpecialType(SpecialType.System_Void)) 610Return New BoundSequence(syntax, ImmutableArray(Of LocalSymbol).Empty, ImmutableArray.Create(Of BoundExpression)(invocation), Nothing, Me.GetSpecialType(SpecialType.System_Void)) 615Return New BoundSequence(syntax, ImmutableArray(Of LocalSymbol).Empty, ImmutableArray.Create(Of BoundExpression)(invocation), Nothing, Me.GetSpecialType(SpecialType.System_Void)) 948Dim intType = Me.GetSpecialType(SpecialType.System_Int32)
Lowering\LocalRewriter\LocalRewriter_LocalDeclaration.vb (2)
172Dim objectType = GetSpecialTypeWithUseSiteDiagnostics(SpecialType.System_Object, syntax) 173Dim booleanType = GetSpecialTypeWithUseSiteDiagnostics(SpecialType.System_Boolean, syntax)
Lowering\LocalRewriter\LocalRewriter_NullableHelpers.vb (2)
63hasValueExpr = New BoundLiteral(operand.Syntax, ConstantValue.True, Me.GetSpecialType(SpecialType.System_Boolean)) 284Me.Compilation.GetSpecialType(SpecialType.System_Boolean), hasErrors:=True)
Lowering\LocalRewriter\LocalRewriter_ObjectCreation.vb (1)
333sequenceType = GetSpecialType(SpecialType.System_Void)
Lowering\LocalRewriter\LocalRewriter_RaiseEvent.vb (2)
80Me.Compilation.GetSpecialType(SpecialType.System_Object)), 82Me.Compilation.GetSpecialType(SpecialType.System_Boolean)).MakeCompilerGenerated
Lowering\LocalRewriter\LocalRewriter_RedimClause.vb (1)
95Compilation.GetSpecialType(SpecialType.System_Void)))
Lowering\LocalRewriter\LocalRewriter_SelectCase.vb (3)
171Me.ReportBadType(selectCaseExpr, Compilation.GetSpecialType(SpecialType.System_Int32)) 172Me.ReportBadType(selectCaseExpr, Compilation.GetSpecialType(SpecialType.System_UInt32)) 173Me.ReportBadType(selectCaseExpr, Compilation.GetSpecialType(SpecialType.System_String))
Lowering\LocalRewriter\LocalRewriter_StringConcat.vb (1)
121If method.IsShared AndAlso method.ContainingType.SpecialType = SpecialType.System_String Then
Lowering\LocalRewriter\LocalRewriter_SyncLock.vb (1)
24Dim objectType = GetSpecialType(SpecialType.System_Object)
Lowering\LocalRewriter\LocalRewriter_Throw.vb (1)
22If expressionOpt.Type.SpecialType = SpecialType.System_Int32 Then
Lowering\LocalRewriter\LocalRewriter_UnstructuredExceptionHandling.vb (4)
42Dim int32 = nodeFactory.SpecialType(SpecialType.System_Int32) 144Dim int32 = nodeFactory.SpecialType(SpecialType.System_Int32) 145Dim bool = nodeFactory.SpecialType(SpecialType.System_Boolean) 408nodeFactory.SpecialType(SpecialType.System_Boolean),
Lowering\LocalRewriter\LocalRewriter_XmlLiterals.vb (3)
261Me.GetSpecialType(SpecialType.System_Int32))), 326Return New BoundLiteral(syntax, ConstantValue.Create(str), GetSpecialType(SpecialType.System_String)).MakeCompilerGenerated() 350Dim size = (New BoundLiteral(syntax, ConstantValue.Create(items.Length), GetSpecialType(SpecialType.System_Int32))).MakeCompilerGenerated()
Lowering\MethodToClassRewriter\MethodToClassRewriter.vb (1)
484Debug.Assert(node.ValueOpt IsNot Nothing OrElse node.HasErrors OrElse node.Type.SpecialType = SpecialType.System_Void)
Lowering\StateMachineRewriter\StateMachineRewriter.StateMachineMethodToClassRewriter.vb (1)
96CachedState = F.SynthesizedLocal(F.SpecialType(SpecialType.System_Int32), SynthesizedLocalKind.StateMachineCachedState, F.Syntax)
Lowering\StateMachineRewriter\StateMachineRewriter.vb (1)
378Friend Function EnsureSpecialType(type As SpecialType, bag As BindingDiagnosticBag) As Symbol
Lowering\SyntheticBoundNodeFactory.vb (1)
226Public Function SpecialType(st As SpecialType) As NamedTypeSymbol
Operations\VisualBasicOperationFactory.vb (1)
1417DirectCast(_semanticModel.Compilation.GetSpecialType(SpecialType.System_Boolean), TypeSymbol),
Operations\VisualBasicOperationFactory_Methods.vb (2)
666Return If(leftOpt?.Type?.SpecialType = SpecialType.System_Object, BinaryOperatorKind.ObjectValueEquals, BinaryOperatorKind.Equals) 668Return If(leftOpt?.Type?.SpecialType = SpecialType.System_Object, BinaryOperatorKind.ObjectValueNotEquals, BinaryOperatorKind.NotEquals)
Preprocessor\CConst.vb (39)
24Public MustOverride ReadOnly Property SpecialType As SpecialType 41Case SpecialType.System_Boolean 43Case SpecialType.System_Byte 45Case SpecialType.System_Char 47Case SpecialType.System_DateTime 49Case SpecialType.System_Decimal 51Case SpecialType.System_Double 53Case SpecialType.System_Int16 55Case SpecialType.System_Int32 57Case SpecialType.System_Int64 59Case SpecialType.System_SByte 61Case SpecialType.System_Single 63Case SpecialType.System_String 65Case SpecialType.System_UInt16 67Case SpecialType.System_UInt32 69Case SpecialType.System_UInt64 77Return New CConst(Of Object)(Nothing, SpecialType.System_Object) 81Return New CConst(Of Boolean)(value, SpecialType.System_Boolean) 85Return New CConst(Of Byte)(value, SpecialType.System_Byte) 89Return New CConst(Of SByte)(value, SpecialType.System_SByte) 93Return New CConst(Of Char)(value, SpecialType.System_Char) 97Return New CConst(Of Short)(value, SpecialType.System_Int16) 101Return New CConst(Of UShort)(value, SpecialType.System_UInt16) 105Return New CConst(Of Integer)(value, SpecialType.System_Int32) 109Return New CConst(Of UInteger)(value, SpecialType.System_UInt32) 113Return New CConst(Of Long)(value, SpecialType.System_Int64) 117Return New CConst(Of ULong)(value, SpecialType.System_UInt64) 121Return New CConst(Of Decimal)(value, SpecialType.System_Decimal) 125Return New CConst(Of String)(value, SpecialType.System_String) 129Return New CConst(Of Single)(value, SpecialType.System_Single) 133Return New CConst(Of Double)(value, SpecialType.System_Double) 137Return New CConst(Of Date)(value, SpecialType.System_DateTime) 142Return SpecialType = SpecialType.None 180Private ReadOnly _specialType As SpecialType 183Friend Sub New(value As T, specialType As SpecialType) 188Private Sub New(value As T, specialType As SpecialType, id As ERRID) 195Public Overrides ReadOnly Property SpecialType As SpecialType 229Public Overrides ReadOnly Property SpecialType As SpecialType 231Return SpecialType.None
Preprocessor\ExpressionEvaluator.vb (190)
25Const _____Byte = CType(SpecialType.System_Byte, Byte) 26Const ____SByte = CType(SpecialType.System_SByte, Byte) 27Const ____Int16 = CType(SpecialType.System_Int16, Byte) 28Const ___UInt16 = CType(SpecialType.System_UInt16, Byte) 29Const ____Int32 = CType(SpecialType.System_Int32, Byte) 30Const ___UInt32 = CType(SpecialType.System_UInt32, Byte) 31Const ____Int64 = CType(SpecialType.System_Int64, Byte) 32Const ___UInt64 = CType(SpecialType.System_UInt64, Byte) 33Const ___Single = CType(SpecialType.System_Single, Byte) 34Const ___Double = CType(SpecialType.System_Double, Byte) 35Const __Decimal = CType(SpecialType.System_Decimal, Byte) 36Const _DateTime = CType(SpecialType.System_DateTime, Byte) 37Const _____Char = CType(SpecialType.System_Char, Byte) 38Const __Boolean = CType(SpecialType.System_Boolean, Byte) 39Const ___String = CType(SpecialType.System_String, Byte) 40Const ___Object = CType(SpecialType.System_Object, Byte) 73Private Shared Function TypeCodeToDominantTypeIndex(specialType As SpecialType) As Integer 75Case SpecialType.System_Byte 77Case SpecialType.System_SByte 79Case SpecialType.System_Int16 81Case SpecialType.System_UInt16 83Case SpecialType.System_Int32 85Case SpecialType.System_UInt32 87Case SpecialType.System_Int64 89Case SpecialType.System_UInt64 91Case SpecialType.System_Single 93Case SpecialType.System_Double 95Case SpecialType.System_Decimal 97Case SpecialType.System_DateTime 99Case SpecialType.System_Char 101Case SpecialType.System_Boolean 103Case SpecialType.System_String 105Case SpecialType.System_Object 325Private Shared Function AsTypeCharacter(specialType As SpecialType) As TypeCharacter 327Case SpecialType.System_Int32 330Case SpecialType.System_Int64 333Case SpecialType.System_Decimal 336Case SpecialType.System_Single 339Case SpecialType.System_Double 342Case SpecialType.System_String 350Private Shared Function GetSpecialType(predefinedType As PredefinedTypeSyntax) As SpecialType 354Return SpecialType.System_Int16 357Return SpecialType.System_UInt16 360Return SpecialType.System_Int32 363Return SpecialType.System_UInt32 366Return SpecialType.System_Int64 369Return SpecialType.System_UInt64 372Return SpecialType.System_Decimal 375Return SpecialType.System_Single 378Return SpecialType.System_Double 381Return SpecialType.System_SByte 384Return SpecialType.System_Byte 387Return SpecialType.System_Boolean 390Return SpecialType.System_Char 393Return SpecialType.System_DateTime 396Return SpecialType.System_String 400Return SpecialType.System_Object 417If specialType <> SpecialType.System_Object AndAlso specialType <> SpecialType.System_String Then 421If value.SpecialType = SpecialType.System_Object OrElse 422value.SpecialType = SpecialType.System_String Then 428If specialType = SpecialType.System_Double OrElse specialType = SpecialType.System_Single Then 448If val.SpecialType = SpecialType.System_Object OrElse 449val.SpecialType = SpecialType.System_String Then 455If specialType = SpecialType.System_Double OrElse specialType = SpecialType.System_Single Then 483Dim specialType As SpecialType 487specialType = SpecialType.System_Boolean 490specialType = SpecialType.System_DateTime 493specialType = SpecialType.System_Double 496specialType = SpecialType.System_SByte 499specialType = SpecialType.System_Byte 502specialType = SpecialType.System_Char 505specialType = SpecialType.System_Int16 508specialType = SpecialType.System_UInt16 511specialType = SpecialType.System_Int32 514specialType = SpecialType.System_UInt32 517specialType = SpecialType.System_Int64 520specialType = SpecialType.System_UInt64 523specialType = SpecialType.System_Single 526specialType = SpecialType.System_String 529specialType = SpecialType.System_Decimal 573If Not IsNothing(whenFalse) AndAlso whenFalse.SpecialType <> SpecialType.System_Object Then 577If whenTrue.SpecialType <> SpecialType.System_Object Then 581Dim dominantType As SpecialType = CType(s_dominantType(TypeCodeToDominantTypeIndex(whenTrue.SpecialType), TypeCodeToDominantTypeIndex(whenFalse.SpecialType)), SpecialType) 611If specialType = SpecialType.System_Boolean Then 620Case SpecialType.System_Char 621Return ReportSemanticError(ERRID.ERR_TypeMismatch2, expr, SpecialType.System_Char.GetDisplayName(), SpecialType.System_Boolean.GetDisplayName()) 622Case SpecialType.System_DateTime 623Return ReportSemanticError(ERRID.ERR_TypeMismatch2, expr, SpecialType.System_DateTime.GetDisplayName(), SpecialType.System_Boolean.GetDisplayName()) 624Case SpecialType.System_Object 630Case SpecialType.System_String 631Return ReportSemanticError(ERRID.ERR_RequiredConstConversion2, expr, SpecialType.System_String.GetDisplayName(), SpecialType.System_Boolean.GetDisplayName()) 633Return ReportSemanticError(ERRID.ERR_TypeMismatch2, expr, specialType, SpecialType.System_Boolean.GetDisplayName()) 637Private Shared Function ConvertToNumeric(value As CConst, toSpecialType As SpecialType, expr As ExpressionSyntax) As CConst 659Case SpecialType.System_Boolean 663numericVal = NarrowIntegralResult(numericVal, SpecialType.System_Int64, toSpecialType, False) 667Case SpecialType.System_Char 668Return ReportSemanticError(ERRID.ERR_TypeMismatch2, expr, SpecialType.System_Char.GetDisplayName(), toSpecialType.GetDisplayName()) 670Case SpecialType.System_DateTime 671Return ReportSemanticError(ERRID.ERR_TypeMismatch2, expr, SpecialType.System_DateTime.GetDisplayName(), toSpecialType.GetDisplayName()) 673Case SpecialType.System_Object 676Case SpecialType.System_String 677Return ReportSemanticError(ERRID.ERR_RequiredConstConversion2, expr, SpecialType.System_String.GetDisplayName(), toSpecialType.GetDisplayName()) 684Private Shared Function ConvertNumericToNumeric(value As CConst, toSpecialType As SpecialType, expr As ExpressionSyntax) As CConst 695Private Shared Function Convert(value As CConst, toSpecialType As SpecialType, expr As ExpressionSyntax) As CConst 710Case SpecialType.System_Boolean 712Case SpecialType.System_Char 714Case SpecialType.System_DateTime 716Case SpecialType.System_Object 718Case SpecialType.System_String 731If fromSpecialType = SpecialType.System_Char Then 740Case SpecialType.System_Boolean 741Return ReportSemanticError(ERRID.ERR_TypeMismatch2, expr, fromSpecialType, SpecialType.System_Char.GetDisplayName()) 743Case SpecialType.System_DateTime 744Return ReportSemanticError(ERRID.ERR_TypeMismatch2, expr, fromSpecialType, SpecialType.System_Char.GetDisplayName()) 746Case SpecialType.System_Object 753Case SpecialType.System_String 759Return ReportSemanticError(ERRID.ERR_TypeMismatch2, expr, fromSpecialType, SpecialType.System_Char.GetDisplayName()) 769If fromSpecialType = SpecialType.System_DateTime Then 774Return ReportSemanticError(ERRID.ERR_TypeMismatch2, expr, fromSpecialType, SpecialType.System_DateTime.GetDisplayName()) 778Case SpecialType.System_Boolean 779Return ReportSemanticError(ERRID.ERR_TypeMismatch2, expr, fromSpecialType, SpecialType.System_DateTime.GetDisplayName()) 781Case SpecialType.System_Char 782Return ReportSemanticError(ERRID.ERR_TypeMismatch2, expr, fromSpecialType, SpecialType.System_DateTime.GetDisplayName()) 784Case SpecialType.System_String 787Case SpecialType.System_Object 795Return ReportSemanticError(ERRID.ERR_TypeMismatch2, expr, fromSpecialType, SpecialType.System_DateTime.GetDisplayName()) 805If specialType = SpecialType.System_String Then 814Case SpecialType.System_Boolean 817Case SpecialType.System_Char 821Case SpecialType.System_DateTime 824Case SpecialType.System_Object 832Return ReportSemanticError(ERRID.ERR_TypeMismatch2, expr, specialType, SpecialType.System_String.GetDisplayName()) 845Return ReportSemanticError(ERRID.ERR_RequiredConstConversion2, expr, value.SpecialType.GetDisplayName(), SpecialType.System_Object.GetDisplayName()) 852If specialType = SpecialType.None Then 856If specialType = SpecialType.System_String OrElse 857(specialType = SpecialType.System_Object AndAlso Not IsNothing(val)) OrElse 858specialType = SpecialType.System_Char OrElse specialType = SpecialType.System_DateTime Then 869Case SpecialType.System_Boolean 871Case SpecialType.System_Byte 873Case SpecialType.System_Decimal 875Case SpecialType.System_Double 877Case SpecialType.System_Int16 879Case SpecialType.System_Int32 881Case SpecialType.System_Int64 883Case SpecialType.System_SByte 885Case SpecialType.System_Single 887Case SpecialType.System_UInt16 889Case SpecialType.System_UInt32 891Case SpecialType.System_UInt64 898If specialType = SpecialType.System_Boolean Then 908Case SpecialType.System_Boolean 910Case SpecialType.System_Byte 912Case SpecialType.System_Decimal 914Case SpecialType.System_Double 916Case SpecialType.System_Int16 918Case SpecialType.System_Int32 920Case SpecialType.System_Int64 922Case SpecialType.System_SByte 924Case SpecialType.System_Single 926Case SpecialType.System_UInt16 928Case SpecialType.System_UInt32 930Case SpecialType.System_UInt64 944Return val.SpecialType = SpecialType.System_Object AndAlso val.ValueAsObject Is Nothing 956Dim OperandType As SpecialType = SpecialType.None 1000Right = ConvertToNumeric(Right, SpecialType.System_Int32, expr.Right) 1006Right = ConvertToNumeric(Right, SpecialType.System_Int32, expr.Right) 1023OperandType = SpecialType.System_String 1029OperandType = SpecialType.System_Int32 1045OperandType = SpecialType.System_String 1060If ResultType = SpecialType.None Then 1077If ResultType = SpecialType.System_String Then 1089ResultType = SpecialType.System_Boolean 1103resultType As SpecialType, 1112If left.SpecialType.IsIntegralType() OrElse left.SpecialType = SpecialType.System_Char OrElse left.SpecialType = SpecialType.System_DateTime Then 1116If resultType = SpecialType.System_Boolean Then 1282If resultType = SpecialType.System_Boolean Then 1407ElseIf left.SpecialType = SpecialType.System_Decimal Then 1411If resultType = SpecialType.System_Boolean Then 1491ElseIf left.SpecialType = SpecialType.System_String Then 1540ElseIf left.SpecialType = SpecialType.System_Boolean Then
Preprocessor\OperatorResolution.vb (39)
28Private Function TypeCodeToIndex(specialType As SpecialType) As Integer 30Case SpecialType.None 32Case SpecialType.System_Boolean 34Case SpecialType.System_SByte 36Case SpecialType.System_Byte 38Case SpecialType.System_Int16 40Case SpecialType.System_UInt16 42Case SpecialType.System_Int32 44Case SpecialType.System_UInt32 46Case SpecialType.System_Int64 48Case SpecialType.System_UInt64 50Case SpecialType.System_Decimal 52Case SpecialType.System_Single 54Case SpecialType.System_Double 56Case SpecialType.System_DateTime 58Case SpecialType.System_Char 60Case SpecialType.System_String 62Case SpecialType.System_Object 78Const t_r4 As Byte = CType(SpecialType.System_Single, Byte) 79Const t_r8 As Byte = CType(SpecialType.System_Double, Byte) 80Const t_dec As Byte = CType(SpecialType.System_Decimal, Byte) 81Const t_str As Byte = CType(SpecialType.System_String, Byte) 83Const t_bad As Byte = CType(SpecialType.None, Byte) 84Const t_i1 As Byte = CType(SpecialType.System_SByte, Byte) 85Const t_i2 As Byte = CType(SpecialType.System_Int16, Byte) 86Const t_i4 As Byte = CType(SpecialType.System_Int32, Byte) 87Const t_i8 As Byte = CType(SpecialType.System_Int64, Byte) 88Const t_ui1 As Byte = CType(SpecialType.System_Byte, Byte) 89Const t_ui2 As Byte = CType(SpecialType.System_UInt16, Byte) 90Const t_ui4 As Byte = CType(SpecialType.System_UInt32, Byte) 91Const t_ui8 As Byte = CType(SpecialType.System_UInt64, Byte) 93Const t_ref As Byte = CType(SpecialType.System_Object, Byte) 94Const t_bool As Byte = CType(SpecialType.System_Boolean, Byte) 95Const t_date As Byte = CType(SpecialType.System_DateTime, Byte) 96Const t_char As Byte = CType(SpecialType.System_Char, Byte) 298Friend Function LookupInOperatorTables(opcode As SyntaxKind, left As SpecialType, right As SpecialType) As SpecialType 349Return CType(s_table(whichTable, TypeCodeToIndex(left), TypeCodeToIndex(right)), SpecialType)
Preprocessor\TypeHelpers.vb (2)
29If specialType = SpecialType.System_Char Then 33If specialType = SpecialType.System_DateTime Then
Semantics\CompileTimeCalculations.vb (7)
259sourceType As SpecialType, 260resultType As SpecialType, 550resultType As SpecialType, 559Case SpecialType.System_Double 562Case SpecialType.System_Single 729sourceType As SpecialType, 730resultType As SpecialType,
Semantics\Conversions.vb (37)
1185(originalTargetType.SpecialType = SpecialType.System_Collections_Generic_IEnumerable_T OrElse 1186originalTargetType.SpecialType = SpecialType.System_Collections_Generic_IList_T OrElse 1187originalTargetType.SpecialType = SpecialType.System_Collections_Generic_ICollection_T OrElse 1188originalTargetType.SpecialType = SpecialType.System_Collections_Generic_IReadOnlyList_T OrElse 1189originalTargetType.SpecialType = SpecialType.System_Collections_Generic_IReadOnlyCollection_T) Then 1481Dim nullableOfT As NamedTypeSymbol = booleanType.ContainingAssembly.GetSpecialType(SpecialType.System_Nullable_T) 2067Dim valueType = typeParameter.ContainingAssembly.GetSpecialType(SpecialType.System_ValueType) 2330If source.SpecialType = SpecialType.System_Void OrElse destination.SpecialType = SpecialType.System_Void Then 2349If destination.SpecialType = SpecialType.System_Object Then 2476If dstUnderlyingSpecial <> SpecialType.System_Collections_Generic_IList_T AndAlso 2477dstUnderlyingSpecial <> SpecialType.System_Collections_Generic_ICollection_T AndAlso 2478dstUnderlyingSpecial <> SpecialType.System_Collections_Generic_IEnumerable_T AndAlso 2479dstUnderlyingSpecial <> SpecialType.System_Collections_Generic_IReadOnlyList_T AndAlso 2480dstUnderlyingSpecial <> SpecialType.System_Collections_Generic_IReadOnlyCollection_T Then 3340Case SpecialType.System_Byte, SpecialType.System_SByte, SpecialType.System_Boolean 3342Case SpecialType.System_Int16, SpecialType.System_UInt16 3344Case SpecialType.System_Int32, SpecialType.System_UInt32 3346Case SpecialType.System_Int64, SpecialType.System_UInt64 3385If source.SpecialType = SpecialType.System_Void OrElse destination.SpecialType = SpecialType.System_Void Then 3395If destination.SpecialType = SpecialType.System_Object Then 3428If source.SpecialType = SpecialType.System_Object Then 3624If source.SpecialType = SpecialType.System_String Then 3626ElseIf destination.SpecialType = SpecialType.System_String Then 3635If array.IsSZArray AndAlso array.ElementType.SpecialType = SpecialType.System_Char Then 3709If destination.SpecialType = SpecialType.System_Object Then 3751If destination.SpecialType = SpecialType.System_ValueType Then 3757Dim valueType = typeParameter.ContainingAssembly.GetSpecialType(SpecialType.System_ValueType) 3905If source.SpecialType = SpecialType.System_Object Then 3911If source.SpecialType = SpecialType.System_ValueType Then 3917Dim valueType = typeParameter.ContainingAssembly.GetSpecialType(SpecialType.System_ValueType)
Semantics\Operators.vb (99)
429ElseIf If(containingType.SpecialType = SpecialType.System_Nullable_T, 470If containingType.SpecialType = SpecialType.System_Nullable_T Then 501<Out()> ByRef intrinsicOperatorType As SpecialType, 508intrinsicOperatorType = SpecialType.None 529If sourceType.SpecialType <> SpecialType.System_Object AndAlso 559If intrinsicOperatorType <> SpecialType.None Then 576operandSpecialType As SpecialType 577) As SpecialType 579Dim intrinsicOperatorType As SpecialType 589Case SpecialType.System_Boolean, 590SpecialType.System_SByte, 591SpecialType.System_Byte, 592SpecialType.System_Int16, 593SpecialType.System_UInt16, 594SpecialType.System_Int32, 595SpecialType.System_UInt32, 596SpecialType.System_Int64, 597SpecialType.System_UInt64, 598SpecialType.System_Object 602Case SpecialType.System_Decimal, 603SpecialType.System_Single, 604SpecialType.System_Double, 605SpecialType.System_String 607intrinsicOperatorType = SpecialType.System_Int64 610intrinsicOperatorType = SpecialType.None 620Case SpecialType.System_Boolean 621intrinsicOperatorType = SpecialType.System_Int16 623Case SpecialType.System_SByte, 624SpecialType.System_Byte, 625SpecialType.System_Int16, 626SpecialType.System_UInt16, 627SpecialType.System_Int32, 628SpecialType.System_UInt32, 629SpecialType.System_Int64, 630SpecialType.System_UInt64, 631SpecialType.System_Decimal, 632SpecialType.System_Single, 633SpecialType.System_Double, 634SpecialType.System_Object 638Case SpecialType.System_String 639intrinsicOperatorType = SpecialType.System_Double 642intrinsicOperatorType = SpecialType.None 652Case SpecialType.System_Boolean, 653SpecialType.System_Byte 655intrinsicOperatorType = SpecialType.System_Int16 657Case SpecialType.System_SByte, 658SpecialType.System_Int16, 659SpecialType.System_Int32, 660SpecialType.System_Int64, 661SpecialType.System_Decimal, 662SpecialType.System_Single, 663SpecialType.System_Double, 664SpecialType.System_Object 668Case SpecialType.System_UInt16 669intrinsicOperatorType = SpecialType.System_Int32 671Case SpecialType.System_UInt32 672intrinsicOperatorType = SpecialType.System_Int64 674Case SpecialType.System_UInt64 675intrinsicOperatorType = SpecialType.System_Decimal 677Case SpecialType.System_String 678intrinsicOperatorType = SpecialType.System_Double 681intrinsicOperatorType = SpecialType.None 858<Out()> ByRef intrinsicOperatorType As SpecialType, 866intrinsicOperatorType = SpecialType.None 903intrinsicOperatorType = SpecialType.System_Object 929intrinsicOperatorType = SpecialType.System_Object 957If leftSpecialType = SpecialType.None AndAlso leftEnumUnderlying.IsCharSZArray() Then 958leftSpecialType = SpecialType.System_String 961If rightSpecialType = SpecialType.None AndAlso rightEnumUnderlying.IsCharSZArray() Then 962rightSpecialType = SpecialType.System_String 967If intrinsicOperatorType <> SpecialType.None Then 975intrinsicOperatorType <> SpecialType.None AndAlso 976intrinsicOperatorType <> SpecialType.System_String AndAlso 977intrinsicOperatorType <> SpecialType.System_Object AndAlso 992If (leftEnumUnderlying.SpecialType <> SpecialType.System_Object AndAlso 995(rightEnumUnderlying.SpecialType <> SpecialType.System_Object AndAlso 1637left As SpecialType, 1638right As SpecialType 1639) As SpecialType 1645Return SpecialType.None 1697Return CType(BinaryOperatorTables.Table(tableKind, leftIndex.Value, rightIndex.Value), SpecialType) 1721Const tErr As SByte = SpecialType.None 1722Const tObj As SByte = SpecialType.System_Object 1723Const tStr As SByte = SpecialType.System_String 1724Const tDbl As SByte = SpecialType.System_Double 1725Const tSBy As SByte = SpecialType.System_SByte 1726Const tShr As SByte = SpecialType.System_Int16 1727Const tInt As SByte = SpecialType.System_Int32 1728Const tLng As SByte = SpecialType.System_Int64 1729Const tDec As SByte = SpecialType.System_Decimal 1730Const tSng As SByte = SpecialType.System_Single 1731Const tByt As SByte = SpecialType.System_Byte 1732Const tUSh As SByte = SpecialType.System_UInt16 1733Const tUIn As SByte = SpecialType.System_UInt32 1734Const tULn As SByte = SpecialType.System_UInt64 1735Const tBoo As SByte = SpecialType.System_Boolean 1736Const tChr As SByte = SpecialType.System_Char 1737Const tDat As SByte = SpecialType.System_DateTime 3163Dim nullableOfT As NamedTypeSymbol = opSet(0).ContainingAssembly.GetSpecialType(SpecialType.System_Nullable_T)
Semantics\OverloadResolution.vb (6)
2456If leftSpecialType = SpecialType.System_Byte AndAlso rightSpecialType = SpecialType.System_SByte Then 2460If leftSpecialType = SpecialType.System_SByte AndAlso rightSpecialType = SpecialType.System_Byte Then 3605If targetType.SpecialType <> SpecialType.System_Object Then 3728argumentType.SpecialType <> SpecialType.System_Object Then
Semantics\TypeInference\TypeArgumentInference.vb (6)
185arrayType.ElementType.SpecialType = SpecialType.System_Object Then 462Graph.ObjectType = unboundLambda.Binder.GetSpecialType(SpecialType.System_Object, lambdaParameter.IdentifierSyntax, Graph.Diagnostic) 2133Dim inferenceSignature As New UnboundLambda.TargetSignature(delegateParams, unboundLambda.Binder.Compilation.GetSpecialType(SpecialType.System_Void), returnsByRef:=False) 2189TypeSymbol.Equals(lambdaReturnNamedType.OriginalDefinition, argument.GetBinderFromLambda().Compilation.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T), TypeCompareKind.ConsiderEverything) OrElse 2190TypeSymbol.Equals(lambdaReturnNamedType.OriginalDefinition, argument.GetBinderFromLambda().Compilation.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerator_T), TypeCompareKind.ConsiderEverything)) 2203unboundLambda.Binder.Compilation.GetSpecialType(SpecialType.System_Void),
SymbolDisplay\SymbolDisplayVisitor_Constants.vb (4)
14Protected Overrides Sub AddExplicitlyCastedLiteralValue(namedType As INamedTypeSymbol, type As SpecialType, value As Object) 20Protected Overrides Sub AddLiteralValue(type As SpecialType, value As Object) 24Case SpecialType.System_String 27Case SpecialType.System_Char
Symbols\AnonymousTypes\AnonymousType_SymbolCollection.vb (9)
117Return Compilation.GetSpecialType(SpecialType.System_Boolean) 123Return Compilation.GetSpecialType(SpecialType.System_Int32) 129Return Compilation.GetSpecialType(SpecialType.System_Object) 135Return Compilation.GetSpecialType(SpecialType.System_IntPtr) 141Return Compilation.GetSpecialType(SpecialType.System_IAsyncResult) 147Return Compilation.GetSpecialType(SpecialType.System_AsyncCallback) 153Return Compilation.GetSpecialType(SpecialType.System_MulticastDelegate) 159Return Compilation.GetSpecialType(SpecialType.System_String) 165Return Compilation.GetSpecialType(SpecialType.System_Void)
Symbols\ArrayTypeSymbol.vb (2)
81Dim iListOfT = declaringAssembly.GetSpecialType(SpecialType.System_Collections_Generic_IList_T) 82Dim iReadOnlyListOfT = declaringAssembly.GetSpecialType(SpecialType.System_Collections_Generic_IReadOnlyList_T)
Symbols\AssemblySymbol.vb (5)
368GetSpecialType(SpecialType.System_Runtime_CompilerServices_PreserveBaseOverridesAttribute).IsClassType() 425Debug.Assert(SpecialMembers.GetDescriptor(feature).DeclaringSpecialType = SpecialType.System_Runtime_CompilerServices_RuntimeFeature) 427Dim runtimeFeature = GetSpecialType(SpecialType.System_Runtime_CompilerServices_RuntimeFeature) 485If CInt(type) <= SpecialType.None OrElse CInt(type) >= InternalSpecialType.NextAvailable Then 498Return GetSpecialType(SpecialType.System_Object)
Symbols\Attributes\AttributeData.vb (10)
423If [property].Type IsNot Nothing AndAlso [property].Type.SpecialType = SpecialType.System_String AndAlso 441ctorArgument.DecodeValue(Of ClassInterfaceType)(SpecialType.System_Enum), 442CType(ctorArgument.DecodeValue(Of Short)(SpecialType.System_Int16), ClassInterfaceType)) 468ctorArgument.DecodeValue(Of ComInterfaceType)(SpecialType.System_Enum), 469CType(ctorArgument.DecodeValue(Of Short)(SpecialType.System_Int16), ComInterfaceType)) 486ctorArgument.DecodeValue(Of Cci.TypeLibTypeFlags)(SpecialType.System_Enum), 487CType(ctorArgument.DecodeValue(Of Short)(SpecialType.System_Int16), Cci.TypeLibTypeFlags)) 493Dim guidString As String = Me.GetConstructorArgument(Of String)(0, SpecialType.System_String) 509Return Me.GetConstructorArgument(Of String)(0, SpecialType.System_String) 516If prop?.Type.SpecialType = SpecialType.System_String Then
Symbols\Attributes\SourceAttributeData.vb (14)
197foundMatch = specType = SpecialType.System_Boolean 201foundMatch = specType = SpecialType.System_Char 205foundMatch = specType = SpecialType.System_SByte 209foundMatch = specType = SpecialType.System_Byte 213foundMatch = specType = SpecialType.System_Int16 217foundMatch = specType = SpecialType.System_UInt16 221foundMatch = specType = SpecialType.System_Int32 225foundMatch = specType = SpecialType.System_UInt32 229foundMatch = specType = SpecialType.System_Int64 233foundMatch = specType = SpecialType.System_UInt64 237foundMatch = specType = SpecialType.System_Single 241foundMatch = specType = SpecialType.System_Double 245foundMatch = specType = SpecialType.System_String 249foundMatch = specType = SpecialType.System_Object
Symbols\ConstantValueUtils.vb (1)
44boundValueType = binder.GetSpecialType(SpecialType.System_Object, initValueSyntax, diagnostics)
Symbols\ConstraintsHelper.vb (8)
175Case SpecialType.System_Object, 176SpecialType.System_ValueType, 177SpecialType.System_Enum, 178SpecialType.System_Delegate, 179SpecialType.System_MulticastDelegate, 180SpecialType.System_Array 1101Case SpecialType.System_Object, SpecialType.System_ValueType
Symbols\ErrorMethodSymbol.vb (1)
175Return _returnType.SpecialType = SpecialType.System_Void
Symbols\EventSymbol.vb (1)
160Return ContainingAssembly.GetSpecialType(SpecialType.System_Void)
Symbols\Metadata\PE\MetadataDecoder.vb (5)
161Return New MissingMetadataTypeSymbol.TopLevel(New MissingModuleSymbolWithName(ModuleSymbol.ContainingAssembly, moduleName), emittedName, SpecialType.None) 369Dim baseSpecialType As SpecialType = If(candidate.BaseTypeNoUseSiteDiagnostics?.SpecialType, SpecialType.None) 370If baseSpecialType = SpecialType.None OrElse baseSpecialType <> If(baseType?.SpecialType, SpecialType.None) Then
Symbols\Metadata\PE\PEFieldSymbol.vb (7)
165If Me.Type.SpecialType = SpecialType.System_DateTime Then 170ElseIf Me.Type.SpecialType = SpecialType.System_Decimal Then 243ElseIf selfOrUnderlyingSpecialType = SpecialType.System_DateTime Then 246ElseIf selfOrUnderlyingSpecialType = SpecialType.System_Boolean Then 249ElseIf selfOrUnderlyingSpecialType = SpecialType.System_Char Then 277If Me.Type.SpecialType = SpecialType.System_DateTime Then 281ElseIf Me.Type.SpecialType = SpecialType.System_Decimal Then
Symbols\Metadata\PE\PEMethodSymbol.vb (1)
922Return Me.ReturnType.SpecialType = SpecialType.System_Void
Symbols\Metadata\PE\PEModuleSymbol.vb (1)
284If (keepLookingForDeclaredCorTypes AndAlso t.SpecialType <> SpecialType.None) Then
Symbols\Metadata\PE\PENamedTypeSymbol.vb (37)
1026Dim baseCorTypeId As SpecialType = base.SpecialType 1028If baseCorTypeId = SpecialType.System_Enum Then 1031ElseIf baseCorTypeId = SpecialType.System_MulticastDelegate OrElse 1032(baseCorTypeId = SpecialType.System_Delegate AndAlso Me.SpecialType <> SpecialType.System_MulticastDelegate) Then 1035ElseIf (baseCorTypeId = SpecialType.System_ValueType AndAlso 1036Me.SpecialType <> SpecialType.System_Enum) Then 1156Case SpecialType.System_Void, 1157SpecialType.System_Boolean, 1158SpecialType.System_Char, 1159SpecialType.System_Byte, 1160SpecialType.System_SByte, 1161SpecialType.System_Int16, 1162SpecialType.System_UInt16, 1163SpecialType.System_Int32, 1164SpecialType.System_UInt32, 1165SpecialType.System_Int64, 1166SpecialType.System_UInt64, 1167SpecialType.System_Single, 1168SpecialType.System_Double, 1169SpecialType.System_Decimal, 1170SpecialType.System_IntPtr, 1171SpecialType.System_UIntPtr, 1172SpecialType.System_DateTime, 1173SpecialType.System_TypedReference, 1174SpecialType.System_ArgIterator, 1175SpecialType.System_RuntimeArgumentHandle, 1176SpecialType.System_RuntimeFieldHandle, 1177SpecialType.System_RuntimeMethodHandle, 1178SpecialType.System_RuntimeTypeHandle 1331specialtype <> SpecialType.System_Enum AndAlso specialtype <> SpecialType.System_MulticastDelegate Then 1334If base IsNot Nothing AndAlso base.SpecialType = SpecialType.None AndAlso base.ContainingAssembly?.IsMissing Then 1341Case SpecialType.System_Enum, 1342SpecialType.System_Delegate, 1343SpecialType.System_MulticastDelegate, 1344SpecialType.System_ValueType
Symbols\Metadata\PE\PETypeParameterSymbol.vb (1)
254ElseIf typeSymbol.SpecialType = SpecialType.System_ValueType Then
Symbols\Metadata\PE\SymbolFactory.vb (1)
33Friend Overrides Function GetSpecialType(moduleSymbol As PEModuleSymbol, specialType As SpecialType) As TypeSymbol
Symbols\MetadataOrSourceAssemblySymbol.vb (1)
71Debug.Assert(typeId <> SpecialType.None)
Symbols\MethodSymbol.vb (3)
570If returnType.SpecialType <> SpecialType.System_Int32 AndAlso returnType.SpecialType <> SpecialType.System_Void Then 592Return array.IsSZArray AndAlso array.ElementType.SpecialType = SpecialType.System_String
Symbols\MissingMetadataTypeSymbol.vb (4)
55Dim arg = If(Me.SpecialType <> SpecialType.None, DirectCast(CustomSymbolDisplayFormatter.DefaultErrorFormat(Me), Object), Me) 197Return CType(_lazyTypeId, SpecialType) 237Public Sub New(moduleSymbol As ModuleSymbol, ByRef emittedName As MetadataTypeName, errorInfo As DiagnosticInfo, Optional typeId As SpecialType = CType(-1, SpecialType))
Symbols\SignatureOnlyMethodSymbol.vb (1)
144Return ReturnType.SpecialType = SpecialType.System_Void
Symbols\Source\ImplicitNamedTypeSymbol.vb (1)
52Dim baseType = DeclaringCompilation.GetSpecialType(SpecialType.System_Object)
Symbols\Source\SourceAssemblySymbol.vb (7)
932Dim obj = GetSpecialType(SpecialType.System_Object) 1171Dim arg As Integer = attrData.GetConstructorArgument(Of Integer)(i, SpecialType.System_Int32) 1543Dim int32Type = Me.DeclaringCompilation.GetSpecialType(SpecialType.System_Int32) 1561Dim boolType = Me.DeclaringCompilation.GetSpecialType(SpecialType.System_Boolean) 1582Dim int32Type = Me.DeclaringCompilation.GetSpecialType(SpecialType.System_Int32) 1615Dim stringType = _compilation.GetSpecialType(SpecialType.System_String) 1624Dim stringType = _compilation.GetSpecialType(SpecialType.System_String)
Symbols\Source\SourceComplexParameterSymbol.vb (2)
379Case SpecialType.System_DateTime 384Case SpecialType.System_Decimal
Symbols\Source\SourceDelegateMethodSymbol.vb (8)
82Dim voidType = binder.GetSpecialType(SpecialType.System_Void, syntax, diagnostics) 83Dim iAsyncResultType = binder.GetSpecialType(SpecialType.System_IAsyncResult, syntax, diagnostics) 84Dim objectType = binder.GetSpecialType(SpecialType.System_Object, syntax, diagnostics) 85Dim intPtrType = binder.GetSpecialType(SpecialType.System_IntPtr, syntax, diagnostics) 86Dim asyncCallbackType = binder.GetSpecialType(SpecialType.System_AsyncCallback, syntax, diagnostics) 124Return binder.GetSpecialType(SpecialType.System_Void, syntax, diagnostics) 259If(returnType.SpecialType = SpecialType.System_Void, SourceMemberFlags.MethodIsSub, Nothing), 332If(invoke.ReturnType.SpecialType = SpecialType.System_Void, SourceMemberFlags.MethodIsSub, Nothing),
Symbols\Source\SourceFieldSymbol.vb (4)
683If Me.Type.SpecialType = SpecialType.System_DateTime Then 686Dim specialTypeInt64 = Me.ContainingAssembly.GetSpecialType(SpecialType.System_Int64) 697ElseIf Me.Type.SpecialType = SpecialType.System_Decimal Then 752Dim offset = attrData.CommonConstructorArguments(0).DecodeValue(Of Integer)(SpecialType.System_Int32)
Symbols\Source\SourceMemberFieldSymbol.vb (2)
268constantType = ContainingAssembly.GetSpecialType(SpecialType.System_Object) 273constantType = ContainingAssembly.GetSpecialType(SpecialType.System_Object)
Symbols\Source\SourceMethodSymbol.vb (16)
1527Dim conditionalSymbol As String = attrdata.GetConstructorArgument(Of String)(0, SpecialType.System_String) 1542Dim priority As Integer = attrdata.GetConstructorArgument(Of Integer)(0, SpecialType.System_Int32) 1699charSet = namedArg.Value.DecodeValue(Of CharSet)(SpecialType.System_Enum) 1702setLastError = namedArg.Value.DecodeValue(Of Boolean)(SpecialType.System_Boolean) 1705exactSpelling = namedArg.Value.DecodeValue(Of Boolean)(SpecialType.System_Boolean) 1708preserveSig = namedArg.Value.DecodeValue(Of Boolean)(SpecialType.System_Boolean) 1711callingConvention = namedArg.Value.DecodeValue(Of System.Runtime.InteropServices.CallingConvention)(SpecialType.System_Enum) 1714bestFitMapping = namedArg.Value.DecodeValue(Of Boolean)(SpecialType.System_Boolean) 1717throwOnUnmappable = namedArg.Value.DecodeValue(Of Boolean)(SpecialType.System_Boolean) 2293Return binder.GetSpecialType(SpecialType.System_Void, Syntax, diagBag) 2299binder.GetSpecialType(SpecialType.System_Void, Syntax, diagBag)) 2314retType = binder.GetSpecialType(SpecialType.System_Void, Syntax, diagBag) 2369If originalRetTypeDef.SpecialType <> SpecialType.System_Collections_Generic_IEnumerable_T AndAlso 2370originalRetTypeDef.SpecialType <> SpecialType.System_Collections_Generic_IEnumerator_T AndAlso 2371retType.SpecialType <> SpecialType.System_Collections_IEnumerable AndAlso 2372retType.SpecialType <> SpecialType.System_Collections_IEnumerator Then
Symbols\Source\SourceModuleSymbol.vb (1)
1084Dim charSet As CharSet = attrData.GetConstructorArgument(Of CharSet)(0, SpecialType.System_Enum)
Symbols\Source\SourceNamedTypeSymbol.vb (20)
1256Private Function IsRestrictedBaseClass(type As SpecialType) As Boolean 1258Case SpecialType.System_Array, 1259SpecialType.System_Delegate, 1260SpecialType.System_MulticastDelegate, 1261SpecialType.System_Enum, 1262SpecialType.System_ValueType 1382ReportUseSiteInfoForBaseType(Me.DeclaringCompilation.GetSpecialType(SpecialType.System_Object), declaredBase, diagnostics) 1386declaredOrDefaultBase = GetSpecialType(SpecialType.System_Object) 1392declaredOrDefaultBase = GetSpecialType(SpecialType.System_Enum) 1395declaredOrDefaultBase = GetSpecialType(SpecialType.System_ValueType) 1398declaredOrDefaultBase = GetSpecialType(SpecialType.System_MulticastDelegate) 1401declaredOrDefaultBase = GetSpecialType(SpecialType.System_Object) 1421Private Function GetSpecialType(type As SpecialType) As NamedTypeSymbol 1511Return GetSpecialType(SpecialType.System_Enum) 1514Return GetSpecialType(SpecialType.System_MulticastDelegate) 2094Dim conditionalSymbol As String = attrdata.GetConstructorArgument(Of String)(0, SpecialType.System_String) 2535Dim stringType = GetSpecialType(SpecialType.System_String) 2557New TypedConstant(GetSpecialType(SpecialType.System_String), TypedConstantKind.Primitive, _comClassData.ClassId)))) 2563New TypedConstant(GetSpecialType(SpecialType.System_Int32), TypedConstantKind.Enum, CInt(ClassInterfaceType.None))))) 2584New TypedConstant(GetSpecialType(SpecialType.System_String), TypedConstantKind.Primitive, eventInterfaceName))))
Symbols\Source\SourceNamedTypeSymbol_ComClass.vb (6)
558method.ReturnType.SpecialType = SpecialType.System_Collections_IEnumerator Then 592prop.Type.SpecialType = SpecialType.System_Collections_IEnumerator Then 1002New TypedConstant(_comClass.GetSpecialType(SpecialType.System_String), TypedConstantKind.Primitive, id)))) 1009New TypedConstant(_comClass.GetSpecialType(SpecialType.System_Int16), 1016ImmutableArray.Create(New TypedConstant(_comClass.GetSpecialType(SpecialType.System_Boolean), 1023ImmutableArray.Create(New TypedConstant(_comClass.GetSpecialType(SpecialType.System_String),
Symbols\Source\SourceNamedTypeSymbol_GroupClass.vb (3)
29Dim baseTypeNames() As String = If(attributeData.GetConstructorArgument(Of String)(0, SpecialType.System_String), "").Split(separatorComma, StringSplitOptions.None) 30Dim createMethods() As String = If(attributeData.GetConstructorArgument(Of String)(1, SpecialType.System_String), "").Split(separatorComma, StringSplitOptions.None) 31Dim disposeMethods() As String = If(attributeData.GetConstructorArgument(Of String)(2, SpecialType.System_String), "").Split(separatorComma, StringSplitOptions.None)
Symbols\Source\SourceNamespaceSymbol.vb (1)
63If type IsNot Nothing AndAlso type.SpecialType <> SpecialType.None Then
Symbols\Source\SourceParameterSymbol.vb (1)
250If attribute.ConstructorArguments.Single().TryDecodeValue(SpecialType.System_String, parameterName) Then
Symbols\Source\SourceParameterSymbolBase.vb (3)
60Case SpecialType.System_DateTime 63ImmutableArray.Create(New TypedConstant(compilation.GetSpecialType(SpecialType.System_Int64), 67Case SpecialType.System_Decimal
Symbols\Source\SourcePropertyAccessorSymbol.vb (1)
243Return binder.GetSpecialType(SpecialType.System_Void, Me.DeclarationSyntax, diagBag)
Symbols\Source\SourcePropertySymbol.vb (6)
282bodyBinder.GetSpecialType(SpecialType.System_Void, identifier, diagnostics), 391If originalRetTypeDef.SpecialType <> SpecialType.System_Collections_Generic_IEnumerable_T AndAlso 392originalRetTypeDef.SpecialType <> SpecialType.System_Collections_Generic_IEnumerator_T AndAlso 393type.SpecialType <> SpecialType.System_Collections_IEnumerable AndAlso 394type.SpecialType <> SpecialType.System_Collections_IEnumerator Then 562Dim priority As Integer = attrdata.GetConstructorArgument(Of Integer)(0, SpecialType.System_Int32)
Symbols\Source\SourceWithEventsBackingFieldSymbol.vb (1)
75ImmutableArray.Create(New TypedConstant(compilation.GetSpecialType(SpecialType.System_String),
Symbols\Source\SynthesizedEntryPointSymbol.vb (4)
25Dim submissionArrayType = compilation.CreateArrayTypeSymbol(compilation.GetSpecialType(SpecialType.System_Object)) 42compilation.GetSpecialType(SpecialType.System_Void), 70Return _returnType.SpecialType = SpecialType.System_Void 229Debug.Assert(returnType.SpecialType = SpecialType.System_Void)
Symbols\Source\SynthesizedEventAccessorSymbol.vb (2)
82type = compilation.GetSpecialType(SpecialType.System_Void) 281Dim boolType As TypeSymbol = compilation.GetSpecialType(SpecialType.System_Boolean)
Symbols\Source\SynthesizedInteractiveInitializerMethod.vb (2)
95Return _returnType.SpecialType = SpecialType.System_Void 167resultType = compilation.GetSpecialType(SpecialType.System_Object)
Symbols\Source\SynthesizedMainTypeEntryPoint.vb (1)
44Return ContainingAssembly.GetSpecialType(SpecialType.System_Void)
Symbols\Source\SynthesizedMyGroupCollectionPropertyAccessorSymbol.vb (1)
213Return ContainingAssembly.GetSpecialType(SpecialType.System_Void)
Symbols\Source\SynthesizedSubmissionConstructorSymbol.vb (4)
33Dim submissionArrayType = compilation.CreateArrayTypeSymbol(compilation.GetSpecialType(SpecialType.System_Object)) 65Dim submissionArrayType = compilation.CreateArrayTypeSymbol(compilation.GetSpecialType(SpecialType.System_Object)) 68Dim intType = compilation.GetSpecialType(SpecialType.System_Int32) 69Dim objectType = compilation.GetSpecialType(SpecialType.System_Object)
Symbols\SpecialTypeExtensions.vb (169)
10Public Function IsFloatingType(this As SpecialType) As Boolean 12Case SpecialType.System_Single, 13SpecialType.System_Double 21Public Function IsIntrinsicType(this As SpecialType) As Boolean 22Return this = SpecialType.System_String OrElse this.IsIntrinsicValueType() 26Public Function IsIntrinsicValueType(this As SpecialType) As Boolean 28Case SpecialType.System_Boolean, 29SpecialType.System_Byte, 30SpecialType.System_SByte, 31SpecialType.System_Int16, 32SpecialType.System_UInt16, 33SpecialType.System_Int32, 34SpecialType.System_UInt32, 35SpecialType.System_Int64, 36SpecialType.System_UInt64, 37SpecialType.System_Single, 38SpecialType.System_Double, 39SpecialType.System_Decimal, 40SpecialType.System_DateTime, 41SpecialType.System_Char 49Public Function IsPrimitiveType(this As SpecialType) As Boolean 51Case SpecialType.System_Boolean, 52SpecialType.System_Byte, 53SpecialType.System_Char, 54SpecialType.System_Double, 55SpecialType.System_Int16, 56SpecialType.System_Int32, 57SpecialType.System_Int64, 58SpecialType.System_UInt16, 59SpecialType.System_UInt32, 60SpecialType.System_UInt64, 61SpecialType.System_IntPtr, 62SpecialType.System_UIntPtr, 63SpecialType.System_SByte, 64SpecialType.System_Single 72Public Function IsStrictSupertypeOfConcreteDelegate(this As SpecialType) As Boolean 74Case SpecialType.System_Object, 75SpecialType.System_Delegate, 76SpecialType.System_MulticastDelegate 84Public Function IsRestrictedType(this As SpecialType) As Boolean 86Case SpecialType.System_TypedReference, 87SpecialType.System_ArgIterator, 88SpecialType.System_RuntimeArgumentHandle 96Public Function IsValidTypeForAttributeArgument(this As SpecialType) As Boolean 98Case SpecialType.System_Boolean, 99SpecialType.System_Byte, 100SpecialType.System_SByte, 101SpecialType.System_Int16, 102SpecialType.System_UInt16, 103SpecialType.System_Int32, 104SpecialType.System_UInt32, 105SpecialType.System_Int64, 106SpecialType.System_UInt64, 107SpecialType.System_Single, 108SpecialType.System_Double, 109SpecialType.System_Char, 110SpecialType.System_Object, 111SpecialType.System_String 119Public Function IsValidTypeForSwitchTable(this As SpecialType) As Boolean 121Case SpecialType.System_Byte, 122SpecialType.System_SByte, 123SpecialType.System_Int16, 124SpecialType.System_UInt16, 125SpecialType.System_Int32, 126SpecialType.System_UInt32, 127SpecialType.System_Int64, 128SpecialType.System_UInt64, 129SpecialType.System_Char, 130SpecialType.System_Boolean, 131SpecialType.System_String 139Public Function TypeToIndex(type As SpecialType) As Integer? 143Case SpecialType.System_Object 145Case SpecialType.System_String 147Case SpecialType.System_Boolean 149Case SpecialType.System_Char 151Case SpecialType.System_SByte 153Case SpecialType.System_Int16 155Case SpecialType.System_Int32 157Case SpecialType.System_Int64 159Case SpecialType.System_Byte 161Case SpecialType.System_UInt16 163Case SpecialType.System_UInt32 165Case SpecialType.System_UInt64 167Case SpecialType.System_Single 169Case SpecialType.System_Double 171Case SpecialType.System_Decimal 173Case SpecialType.System_DateTime 184Public Function GetNativeCompilerVType(this As SpecialType) As String 186Case SpecialType.System_Void 188Case SpecialType.System_Boolean 190Case SpecialType.System_Char 192Case SpecialType.System_SByte 194Case SpecialType.System_Byte 196Case SpecialType.System_Int16 198Case SpecialType.System_UInt16 200Case SpecialType.System_Int32 202Case SpecialType.System_UInt32 204Case SpecialType.System_Int64 206Case SpecialType.System_UInt64 208Case SpecialType.System_Decimal 210Case SpecialType.System_Single 212Case SpecialType.System_Double 214Case SpecialType.System_String 216Case SpecialType.System_IntPtr, SpecialType.System_UIntPtr 218Case SpecialType.System_Array 220Case SpecialType.System_DateTime 228Public Function GetDisplayName(this As SpecialType) As String 235Public Function TryGetKeywordText(this As SpecialType) As String 237Case SpecialType.System_SByte 239Case SpecialType.System_Int16 241Case SpecialType.System_Int32 243Case SpecialType.System_Int64 245Case SpecialType.System_Byte 247Case SpecialType.System_UInt16 249Case SpecialType.System_UInt32 251Case SpecialType.System_UInt64 253Case SpecialType.System_Single 255Case SpecialType.System_Double 257Case SpecialType.System_Decimal 259Case SpecialType.System_Char 261Case SpecialType.System_Boolean 263Case SpecialType.System_String 265Case SpecialType.System_Object 267Case SpecialType.System_DateTime 269Case SpecialType.System_Void 277Friend Function ToConstantValueDiscriminator(this As SpecialType) As ConstantValueTypeDiscriminator 279Case SpecialType.System_SByte 281Case SpecialType.System_Byte 283Case SpecialType.System_Int16 285Case SpecialType.System_UInt16 287Case SpecialType.System_Int32 289Case SpecialType.System_UInt32 291Case SpecialType.System_Int64 293Case SpecialType.System_UInt64 295Case SpecialType.System_Char 297Case SpecialType.System_Boolean 299Case SpecialType.System_Single 301Case SpecialType.System_Double 303Case SpecialType.System_Decimal 305Case SpecialType.System_DateTime 307Case SpecialType.System_String 315Friend Function GetShiftSizeMask(this As SpecialType) As Integer 317Case SpecialType.System_SByte, SpecialType.System_Byte 320Case SpecialType.System_Int16, SpecialType.System_UInt16 323Case SpecialType.System_Int32, SpecialType.System_UInt32 326Case SpecialType.System_Int64, SpecialType.System_UInt64 335Public Function ToRuntimeType(this As SpecialType) As Type 337Case SpecialType.System_SByte 339Case SpecialType.System_Int16 341Case SpecialType.System_Int32 343Case SpecialType.System_Int64 345Case SpecialType.System_Byte 347Case SpecialType.System_UInt16 349Case SpecialType.System_UInt32 351Case SpecialType.System_UInt64 353Case SpecialType.System_Single 355Case SpecialType.System_Double 357Case SpecialType.System_Decimal 359Case SpecialType.System_Char 361Case SpecialType.System_Boolean 363Case SpecialType.System_String 365Case SpecialType.System_Object 367Case SpecialType.System_DateTime 369Case SpecialType.System_Void
Symbols\SynthesizedSymbols\SynthesizedConstructorBase.vb (2)
47m_voidType = binder.GetSpecialType(SpecialType.System_Void, syntaxReference.GetSyntax(), diagnostics) 52m_voidType = ContainingAssembly.GetSpecialType(SpecialType.System_Void)
Symbols\SynthesizedSymbols\SynthesizedDelegateMethodSymbol.vb (1)
257Return _returnType.SpecialType = SpecialType.System_Void
Symbols\SynthesizedSymbols\SynthesizedGlobal_StringSwitchHashMethodSymbol.vb (2)
34_parameters = ImmutableArray.Create(Of ParameterSymbol)(New SynthesizedParameterSimpleSymbol(Me, compilation.GetSpecialType(SpecialType.System_String), 0, "s")) 35_returnType = compilation.GetSpecialType(SpecialType.System_UInt32)
Symbols\SynthesizedSymbols\SynthesizedMethod.vb (1)
96Dim type = ContainingAssembly.GetSpecialType(SpecialType.System_Void)
Symbols\TypedConstant.vb (4)
37If constant.Kind = TypedConstantKind.Type OrElse constant.TypeInternal.SpecialType = SpecialType.System_Object Then 54Dim splType As SpecialType = DirectCast(constant.TypeInternal, NamedTypeSymbol).EnumUnderlyingType.SpecialType 66Private Function DisplayUnsignedEnumConstant(constant As TypedConstant, splType As SpecialType, ByVal constantToDecode As ULong, ByVal typeName As String) As String 130Private Function DisplaySignedEnumConstant(constant As TypedConstant, ByVal splType As SpecialType, ByVal constantToDecode As Long, ByVal typeName As String) As String
Symbols\TypeParameterSymbol.vb (3)
255Case SpecialType.System_Object, 256SpecialType.System_ValueType, 257SpecialType.System_Enum
Symbols\TypeSymbol.vb (2)
287Public ReadOnly Property SpecialType As SpecialType Implements ITypeSymbol.SpecialType, ITypeSymbolInternal.SpecialType 289Return CType(ExtendedSpecialType, SpecialType)
Symbols\TypeSymbolExtensions.vb (32)
15Return this.OriginalDefinition.SpecialType = SpecialType.System_Nullable_T 172If array.IsSZArray AndAlso array.ElementType.SpecialType = SpecialType.System_Char Then 190If type.SpecialType = SpecialType.None AndAlso 211If type.SpecialType = SpecialType.None AndAlso 285Public Function GetSpecialTypeSafe(this As TypeSymbol) As SpecialType 286Return If(this IsNot Nothing, this.SpecialType, SpecialType.None) 316Return this.SpecialType = SpecialType.System_Single 321Return this.SpecialType = SpecialType.System_Double 326Return this.SpecialType = SpecialType.System_Boolean 331Return this.SpecialType = SpecialType.System_Char 336Return this.SpecialType = SpecialType.System_String 341Return this.SpecialType = SpecialType.System_Object 351Return this.SpecialType = SpecialType.System_Void 356Return this.SpecialType = SpecialType.System_Decimal 361Return this.SpecialType = SpecialType.System_DateTime 430Case SpecialType.System_Boolean 432Case SpecialType.System_Byte 434Case SpecialType.System_SByte 436Case SpecialType.System_Int16 438Case SpecialType.System_UInt16 440Case SpecialType.System_Int32 442Case SpecialType.System_UInt32 444Case SpecialType.System_Int64 446Case SpecialType.System_UInt64 448Case SpecialType.System_Single 450Case SpecialType.System_Double 452Case SpecialType.System_Decimal 454Case SpecialType.System_DateTime 456Case SpecialType.System_Char 458Case SpecialType.System_String 682Dim genericIEnumerable = typeWithContainingAssembly.ContainingAssembly.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T) 734fieldType.SpecialType = SpecialType.System_Object OrElse
Symbols\WellKnownMembers.vb (3)
236Dim specialTypeByte = GetSpecialType(SpecialType.System_Byte) 239Dim specialTypeUInt32 = GetSpecialType(SpecialType.System_UInt32) 705Dim stringType = GetSpecialType(SpecialType.System_String)
Syntax\VisualBasicSyntaxTree.ConditionalSymbolsMap.vb (10)
179Case SpecialType.System_Boolean 182Case SpecialType.System_Byte 185Case SpecialType.System_Int16 188Case SpecialType.System_Int32 191Case SpecialType.System_Int64 194Case SpecialType.System_SByte 197Case SpecialType.System_UInt16 200Case SpecialType.System_UInt32 203Case SpecialType.System_UInt64 206Case SpecialType.System_String
Utilities\TypeUnification.vb (1)
151If t2.Type.SpecialType = SpecialType.System_Void Then
Utilities\VarianceAmbiguity.vb (2)
138If typeArgument1.SpecialType <> SpecialType.System_Object AndAlso 139typeArgument2.SpecialType <> SpecialType.System_Object AndAlso
VisualBasicExtensions.vb (1)
788Public Function GetSpecialType(compilation As Compilation, typeId As SpecialType) As INamedTypeSymbol
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (16)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\ExpressionSyntaxExtensions.vb (1)
111If typeInfo.Type IsNot Nothing AndAlso typeInfo.Type.SpecialType = SpecialType.System_Void Then
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Utilities\CastAnalyzer.vb (15)
225If If(castType?.SpecialType = SpecialType.System_Object, False) AndAlso 319DirectCast(castExpressionType.OriginalDefinition, ITypeSymbol).SpecialType = SpecialType.System_Nullable_T 381Case SpecialType.System_Single, SpecialType.System_Double 383Case SpecialType.System_UInt32, SpecialType.System_Int32, 384SpecialType.System_UInt64, SpecialType.System_Int64, 385SpecialType.System_Decimal 397ElseIf castType.SpecialType = SpecialType.System_DateTime Then 398Return Not outerType.SpecialType = SpecialType.System_DateTime 399ElseIf castType.SpecialType = SpecialType.System_Boolean Then 400Return Not (outerType.IsNumericType OrElse outerType.SpecialType = SpecialType.System_Boolean) 403If castType.OriginalDefinition?.SpecialType = SpecialType.System_Nullable_T Then 415If castType.Equals(outerType) OrElse outerType.SpecialType = SpecialType.System_Object Then
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (151)
src\Analyzers\VisualBasic\CodeFixes\GenerateParameterizedMember\VisualBasicGenerateParameterizedMemberService.vb (6)
43Return Me.Document.SemanticModel.Compilation.GetSpecialType(SpecialType.System_Int32) 45Return Me.Document.SemanticModel.Compilation.GetSpecialType(SpecialType.System_Int64) 47Return Me.Document.SemanticModel.Compilation.GetSpecialType(SpecialType.System_Decimal) 49Return Me.Document.SemanticModel.Compilation.GetSpecialType(SpecialType.System_Single) 51Return Me.Document.SemanticModel.Compilation.GetSpecialType(SpecialType.System_Double) 53Return Me.Document.SemanticModel.Compilation.GetSpecialType(SpecialType.System_String)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\ExpressionGenerator.vb (28)
71Return GenerateIntegralLiteralExpression(type, SpecialType.System_SByte, DirectCast(value, SByte), canUseFieldReference, LiteralSpecialValues.SByteSpecialValues, Function(x) x < 0, Function(x) -x, "128") 73Return GenerateIntegralLiteralExpression(type, SpecialType.System_Int16, DirectCast(value, Short), canUseFieldReference, LiteralSpecialValues.Int16SpecialValues, Function(x) x < 0, Function(x) -x, "32768") 75Return GenerateIntegralLiteralExpression(type, SpecialType.System_Int32, DirectCast(value, Integer), canUseFieldReference, LiteralSpecialValues.Int32SpecialValues, Function(x) x < 0, Function(x) -x, "2147483648") 77Return GenerateIntegralLiteralExpression(type, SpecialType.System_Int64, DirectCast(value, Long), canUseFieldReference, LiteralSpecialValues.Int64SpecialValues, Function(x) x < 0, Function(x) -x, "9223372036854775808") 79Return GenerateNonNegativeIntegralLiteralExpression(type, SpecialType.System_Byte, DirectCast(value, Byte), canUseFieldReference, LiteralSpecialValues.ByteSpecialValues) 81Return GenerateNonNegativeIntegralLiteralExpression(type, SpecialType.System_UInt16, DirectCast(value, UShort), canUseFieldReference, LiteralSpecialValues.UInt16SpecialValues) 83Return GenerateNonNegativeIntegralLiteralExpression(type, SpecialType.System_UInt32, DirectCast(value, UInteger), canUseFieldReference, LiteralSpecialValues.UInt32SpecialValues) 85Return GenerateNonNegativeIntegralLiteralExpression(type, SpecialType.System_UInt64, DirectCast(value, ULong), canUseFieldReference, LiteralSpecialValues.UInt64SpecialValues) 116If Not IsSpecialType(type, SpecialType.System_String) Then 163specialType As SpecialType, 179specialType As SpecialType, 216If TypeOf value Is Byte AndAlso Not IsSpecialType(type, SpecialType.System_Byte) Then 218ElseIf TypeOf value Is SByte AndAlso Not IsSpecialType(type, SpecialType.System_SByte) Then 229If TypeOf value Is Short AndAlso Not IsSpecialType(type, SpecialType.System_Int16) Then 232ElseIf TypeOf value Is Long AndAlso Not IsSpecialType(type, SpecialType.System_Int64) Then 239Dim typeIsNotDecimal = Not IsSpecialType(type, SpecialType.System_Decimal) 249ElseIf TypeOf value Is UShort AndAlso Not IsSpecialType(type, SpecialType.System_UInt16) Then 252ElseIf TypeOf value Is UInteger AndAlso Not IsSpecialType(type, SpecialType.System_UInt32) Then 258Dim typeIsNotULong = Not IsSpecialType(type, SpecialType.System_UInt64) 266ElseIf TypeOf value Is Single AndAlso Not IsSpecialType(type, SpecialType.System_Single) Then 269ElseIf TypeOf value Is Double AndAlso Not IsSpecialType(type, SpecialType.System_Double) Then 295type, SpecialType.System_Double, value, canUseFieldReference, 320type, SpecialType.System_Single, value, canUseFieldReference, 326specialType As SpecialType, 375Dim field = GenerateFieldReference(SpecialType.System_Decimal, value, LiteralSpecialValues.DecimalSpecialValues) 389Private Function AddSpecialTypeAnnotation(type As SpecialType, expression As MemberAccessExpressionSyntax) As MemberAccessExpressionSyntax 390If SpecialType.None <> type Then 397Private Function GenerateFieldReference(Of TStructure)(type As SpecialType,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\MethodGenerator.vb (1)
70Dim isSub = method.ReturnType.SpecialType = SpecialType.System_Void
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\NamedTypeGenerator.vb (2)
149If(namedType.EnumUnderlyingType IsNot Nothing AndAlso namedType.EnumUnderlyingType.SpecialType <> SpecialType.System_Int32, 207namedType.BaseType.SpecialType = SpecialType.System_Object Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\ParameterGenerator.vb (1)
47elementType.OriginalDefinition.SpecialType <> SpecialType.System_Nullable_T Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\VisualBasicFlagsEnumGenerator.vb (1)
25underlyingSpecialType As SpecialType,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ITypeSymbolExtensions.vb (49)
19Public Function GetPredefinedCastKeyword(specialType As SpecialType) As SyntaxKind 21Case specialType.System_Boolean 23Case specialType.System_Byte 25Case specialType.System_Char 27Case specialType.System_DateTime 29Case specialType.System_Decimal 31Case specialType.System_Double 33Case specialType.System_Int32 35Case specialType.System_Int64 37Case specialType.System_Object 39Case specialType.System_SByte 41Case specialType.System_Single 43Case specialType.System_Int16 45Case SpecialType.System_String 47Case specialType.System_UInt32 49Case specialType.System_UInt64 51Case specialType.System_UInt16 60Dim specialType As SpecialType 63specialType = specialType.System_Boolean 65specialType = specialType.System_Byte 67specialType = specialType.System_Char 69specialType = specialType.System_DateTime 71specialType = specialType.System_Decimal 73specialType = specialType.System_Double 75specialType = specialType.System_Int32 77specialType = specialType.System_Int64 79specialType = specialType.System_Object 81specialType = specialType.System_SByte 83specialType = specialType.System_Single 85specialType = specialType.System_String 87specialType = specialType.System_Int16 89specialType = specialType.System_UInt32 91specialType = specialType.System_UInt64 93specialType = specialType.System_UInt16 104Case SpecialType.System_Boolean, 105SpecialType.System_Byte, 106SpecialType.System_SByte, 107SpecialType.System_Int16, 108SpecialType.System_UInt16, 109SpecialType.System_Int32, 110SpecialType.System_UInt32, 111SpecialType.System_Int64, 112SpecialType.System_UInt64, 113SpecialType.System_Single, 114SpecialType.System_Double, 115SpecialType.System_Decimal, 116SpecialType.System_DateTime, 117SpecialType.System_Char, 118SpecialType.System_String
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\StringExtensions.vb (16)
97Case SpecialType.System_Boolean, 98SpecialType.System_Byte, 99SpecialType.System_SByte, 100SpecialType.System_Int16, 101SpecialType.System_UInt16, 102SpecialType.System_Int32, 103SpecialType.System_UInt32, 104SpecialType.System_Int64, 105SpecialType.System_UInt64, 106SpecialType.System_Single, 107SpecialType.System_Double, 108SpecialType.System_Decimal, 109SpecialType.System_DateTime, 110SpecialType.System_Char, 111SpecialType.System_String, 112SpecialType.System_Object
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\TypeSyntaxGeneratorVisitor.vb (17)
81If symbol.OriginalDefinition.SpecialType = SpecialType.System_Nullable_T Then 96Case SpecialType.System_Object 98Case SpecialType.System_Boolean 100Case SpecialType.System_Char 102Case SpecialType.System_SByte 104Case SpecialType.System_Byte 106Case SpecialType.System_Int16 108Case SpecialType.System_UInt16 110Case SpecialType.System_Int32 112Case SpecialType.System_Int64 114Case SpecialType.System_UInt32 116Case SpecialType.System_UInt64 118Case SpecialType.System_Decimal 120Case SpecialType.System_Single 122Case SpecialType.System_Double 124Case SpecialType.System_String 126Case SpecialType.System_DateTime
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicTypeInferenceService.TypeInferrer.vb (30)
235Return CreateResult(Compilation.GetSpecialType(SpecialType.System_Int32)) 282Return CreateResult(Compilation.GetSpecialType(SpecialType.System_Int32)) 412Return CreateResult(Me.Compilation.GetSpecialType(SpecialType.System_Int32)) 452Return CreateResult(Me.Compilation.GetSpecialType(SpecialType.System_Int32)) 486Return types.Select(Function(t) New TypeInferenceInfo(If(t.InferredType.SpecialType = SpecialType.System_Void, task, taskOfT.Construct(t.InferredType)))) 505New TypeInferenceInfo(Me.Compilation.GetSpecialType(SpecialType.System_Nullable_T).Construct(t.InferredType)), 511If t.InferredType.OriginalDefinition.SpecialType = SpecialType.System_Nullable_T Then 534Return CreateResult(Me.Compilation.GetSpecialType(SpecialType.System_Int32)) 544If otherSideTypes.Any(Function(t) t.InferredType.SpecialType <> SpecialType.System_Object AndAlso Not t.InferredType.IsErrorType()) Then 568Return CreateResult(Me.Compilation.GetSpecialType(SpecialType.System_Int32)) 574Return CreateResult(SpecialType.System_Boolean) 594Return CreateResult(SpecialType.System_Boolean) 598Return CreateResult(SpecialType.System_Boolean) 605Return CreateResult(SpecialType.System_IDisposable) 648Return CreateResult(SpecialType.System_Void) 660Dim type = Me.Compilation.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T) 664Dim type = Me.Compilation.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T) 665Return CreateResult(type.Construct(Compilation.GetSpecialType(SpecialType.System_Object))) 694Return CreateResult(Me.Compilation.GetSpecialType(SpecialType.System_Int32)) 698Return CreateResult(SpecialType.System_Boolean) 773If memberType.OriginalDefinition.SpecialType = SpecialType.System_Collections_Generic_IEnumerable_T OrElse 774memberType.OriginalDefinition.SpecialType = SpecialType.System_Collections_Generic_IEnumerator_T Then 806Return CreateResult(Me.Compilation.GetSpecialType(SpecialType.System_Int32)) 815Return CreateResult(SpecialType.System_Boolean) 823Return CreateResult(SpecialType.System_Boolean) 841Return CreateResult(Me.Compilation.GetSpecialType(SpecialType.System_Int32)) 848Return CreateResult(SpecialType.System_Boolean) 857Return CreateResult(SpecialType.System_IDisposable) 869Return CreateResult(SpecialType.System_Boolean) 873Return CreateResult(SpecialType.System_Boolean)
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (1)
NavigationBar\VisualBasicEditorNavigationBarItemService_CodeGeneration.vb (1)
234returnType:=compilation.GetSpecialType(SpecialType.System_Void),
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (83)
Attributes\AttributeTests.vb (1)
2201Dim classYOfInt As NamedTypeSymbol = classY.Construct(ImmutableArray.Create(Of TypeSymbol)(m.ContainingAssembly.GetSpecialType(SpecialType.System_Int32)))
Attributes\AttributeTests_Synthesized.vb (1)
1827New TypedConstant(comp.GetSpecialType(SpecialType.System_String), TypedConstantKind.Primitive, "unused"))))
Attributes\AttributeTests_Tuples.vb (2)
320Assert.Equal(SpecialType.System_Object, sender.Type.SpecialType) 440Assert.True(constant.Type.SpecialType = SpecialType.System_String)
CodeGen\CodeGenTuples.vb (54)
6864Dim intType As TypeSymbol = comp.GetSpecialType(SpecialType.System_Int32) 6887Dim intType As TypeSymbol = comp.GetSpecialType(SpecialType.System_Int32) 6888Dim stringType As TypeSymbol = comp.GetSpecialType(SpecialType.System_String) 6916Dim intType As TypeSymbol = comp.GetSpecialType(SpecialType.System_Int32) 6917Dim stringType As TypeSymbol = comp.GetSpecialType(SpecialType.System_String) 6939Dim intType As TypeSymbol = comp.GetSpecialType(SpecialType.System_Int32) 6940Dim stringType As TypeSymbol = comp.GetSpecialType(SpecialType.System_String) 6959Dim intType As TypeSymbol = comp.GetSpecialType(SpecialType.System_Int32) 6960Dim stringType As TypeSymbol = comp.GetSpecialType(SpecialType.System_String) 6979Dim intType As TypeSymbol = comp.GetSpecialType(SpecialType.System_Int32) 6980Dim stringType As TypeSymbol = comp.GetSpecialType(SpecialType.System_String) 7000Dim intType As TypeSymbol = comp.GetSpecialType(SpecialType.System_Int32) 7018Dim intType As TypeSymbol = comp.GetSpecialType(SpecialType.System_Int32) 7019Dim stringType As TypeSymbol = comp.GetSpecialType(SpecialType.System_String) 7043Dim intType As TypeSymbol = comp.GetSpecialType(SpecialType.System_Int32) 7044Dim stringType As TypeSymbol = comp.GetSpecialType(SpecialType.System_String) 7068Dim intType As TypeSymbol = comp.GetSpecialType(SpecialType.System_Int32) 7069Dim stringType As TypeSymbol = comp.GetSpecialType(SpecialType.System_String) 7093Dim intType As TypeSymbol = comp.GetSpecialType(SpecialType.System_Int32) 7094Dim stringType As TypeSymbol = comp.GetSpecialType(SpecialType.System_String) 7118Dim intType As TypeSymbol = comp.GetSpecialType(SpecialType.System_Int32) 7119Dim stringType As TypeSymbol = comp.GetSpecialType(SpecialType.System_String) 7149Dim intType As TypeSymbol = comp.GetSpecialType(SpecialType.System_Int32) 7168Dim intType As NamedTypeSymbol = comp.GetSpecialType(SpecialType.System_Int32) 7190Dim intType As NamedTypeSymbol = comp.GetSpecialType(SpecialType.System_Int32) 7218Dim intType As ITypeSymbol = comp.GetSpecialType(SpecialType.System_Int32) 7244Dim intType As ITypeSymbol = comp.GetSpecialType(SpecialType.System_Int32) 7245Dim stringType As ITypeSymbol = comp.GetSpecialType(SpecialType.System_String) 7267Dim intType As ITypeSymbol = comp.GetSpecialType(SpecialType.System_Int32) 7268Dim stringType As ITypeSymbol = comp.GetSpecialType(SpecialType.System_String) 7290Dim intType As ITypeSymbol = comp.GetSpecialType(SpecialType.System_Int32) 7291Dim stringType As ITypeSymbol = comp.GetSpecialType(SpecialType.System_String) 7308Dim intType As ITypeSymbol = comp.GetSpecialType(SpecialType.System_Int32) 7309Dim stringType As ITypeSymbol = comp.GetSpecialType(SpecialType.System_String) 7326Dim intType As ITypeSymbol = comp.GetSpecialType(SpecialType.System_Int32) 7342Dim intType As ITypeSymbol = comp.GetSpecialType(SpecialType.System_Int32) 7343Dim stringType As ITypeSymbol = comp.GetSpecialType(SpecialType.System_String) 7363Dim intType As ITypeSymbol = comp.GetSpecialType(SpecialType.System_Int32) 7364Dim stringType As ITypeSymbol = comp.GetSpecialType(SpecialType.System_String) 7384Dim intType As ITypeSymbol = comp.GetSpecialType(SpecialType.System_Int32) 7385Dim stringType As ITypeSymbol = comp.GetSpecialType(SpecialType.System_String) 7405Dim intType As ITypeSymbol = comp.GetSpecialType(SpecialType.System_Int32) 7406Dim stringType As ITypeSymbol = comp.GetSpecialType(SpecialType.System_String) 7432Dim intType As ITypeSymbol = comp.GetSpecialType(SpecialType.System_Int32) 7449Dim intType As ITypeSymbol = comp.GetSpecialType(SpecialType.System_Int32) 7481Dim stringType As ITypeSymbol = comp.GetSpecialType(SpecialType.System_String) 7502Dim intType = comp.GetSpecialType(SpecialType.System_Int32) 7503Dim stringType = comp.GetSpecialType(SpecialType.System_String) 7529Dim intType As NamedTypeSymbol = comp.GetSpecialType(SpecialType.System_String) 8934Dim intType As TypeSymbol = comp.GetSpecialType(SpecialType.System_Int32) 10121Sub(t) Assert.Equal(SpecialType.System_Int32, t.SpecialType)) 16410Assert.False(m1ToString.ReturnType.SpecialType = SpecialType.System_Void) 20503Sub(t) Assert.Equal(SpecialType.System_Int32, t.SpecialType)) 20518Sub(t) Assert.Equal(SpecialType.System_Int32, t.SpecialType))
Emit\CompilationEmitTests.vb (2)
3820Assert.Equal(SpecialType.System_ValueType, typeSymbol.SpecialType) 4284compilation.GetSpecialType(SpecialType.System_Int32)
Emit\EmitMetadata.vb (17)
515Assert.Same([Module].GetCorLibType(SpecialType.System_Array), parameter1Type) 516Assert.Same([Module].GetCorLibType(SpecialType.System_Boolean), m2.Parameters.Single().Type) 517Assert.Same([Module].GetCorLibType(SpecialType.System_Char), m3.Parameters.Single().Type) 521Assert.Same([Module].GetCorLibType(SpecialType.System_Void), m4.ReturnType) 522Assert.Same([Module].GetCorLibType(SpecialType.System_SByte), method4ParamTypes(0)) 523Assert.Same([Module].GetCorLibType(SpecialType.System_Single), method4ParamTypes(1)) 524Assert.Same([Module].GetCorLibType(SpecialType.System_Double), method4ParamTypes(2)) 525Assert.Same([Module].GetCorLibType(SpecialType.System_Int16), method4ParamTypes(3)) 526Assert.Same([Module].GetCorLibType(SpecialType.System_Int32), method4ParamTypes(4)) 527Assert.Same([Module].GetCorLibType(SpecialType.System_Int64), method4ParamTypes(5)) 528Assert.Same([Module].GetCorLibType(SpecialType.System_IntPtr), method4ParamTypes(6)) 529Assert.Same([Module].GetCorLibType(SpecialType.System_String), method4ParamTypes(7)) 530Assert.Same([Module].GetCorLibType(SpecialType.System_Byte), method4ParamTypes(8)) 531Assert.Same([Module].GetCorLibType(SpecialType.System_UInt16), method4ParamTypes(9)) 532Assert.Same([Module].GetCorLibType(SpecialType.System_UInt32), method4ParamTypes(10)) 533Assert.Same([Module].GetCorLibType(SpecialType.System_UInt64), method4ParamTypes(11)) 534Assert.Same([Module].GetCorLibType(SpecialType.System_UIntPtr), method4ParamTypes(12))
Emit\NoPiaEmbedTypes.vb (5)
1022Assert.Equal(SpecialType.System_ValueType, test2.BaseType.SpecialType) 1090Assert.Equal(SpecialType.System_Int32, test9.EnumUnderlyingType.SpecialType) 1164Assert.Equal(SpecialType.System_MulticastDelegate, test11.BaseType.SpecialType) 1306Assert.Equal(SpecialType.System_Void, paramInfo(0).Type.SpecialType) 1879Assert.Equal(expr.Type.SpecialType, SpecialType.System_String)
PDB\PDBTests.vb (1)
192Dim stInt = c1.GetSpecialType(SpecialType.System_Int32)
Microsoft.CodeAnalysis.VisualBasic.ExpressionCompiler (8)
CompilationContext.vb (5)
94_voidType = Me.Compilation.GetSpecialType(SpecialType.System_Void) 133Dim objectType = Me.Compilation.GetSpecialType(SpecialType.System_Object) 199Dim objectType = Me.Compilation.GetSpecialType(SpecialType.System_Object) 516Case SpecialType.System_Void 520Case SpecialType.System_Boolean
Rewriters\LocalDeclarationRewriter.vb (2)
60Dim stringType = compilation.GetSpecialType(SpecialType.System_String) 63compilation.GetSpecialType(SpecialType.System_Byte),
Symbols\EEMethodSymbol.vb (1)
263Return ReturnType.SpecialType = SpecialType.System_Void
Microsoft.CodeAnalysis.VisualBasic.Features (46)
CodeFixes\GenerateEvent\GenerateEventCodeFixProvider.vb (3)
143returnType:=semanticModel.Compilation.GetSpecialType(SpecialType.System_Void), 285semanticModel.Compilation.GetSpecialType(SpecialType.System_Void)) 392returnType:=semanticModel.Compilation.GetSpecialType(SpecialType.System_Void),
Completion\CompletionProviders\OverrideCompletionProvider.vb (1)
192If overriddenMember.ContainingType.SpecialType = SpecialType.System_Object Then
Completion\KeywordRecommenders\Expressions\TrueFalseKeywordRecommender.vb (1)
37Return types.Any(Function(t) t.SpecialType = SpecialType.System_Boolean)
Completion\KeywordRecommenders\Types\BuiltInTypesKeywordRecommender.vb (19)
86SpecialType.System_Boolean, 87SpecialType.System_Byte, 88SpecialType.System_Char, 89SpecialType.System_DateTime, 90SpecialType.System_Decimal, 91SpecialType.System_Double, 92SpecialType.System_Int32, 93SpecialType.System_Int64, 94SpecialType.System_Object, 95SpecialType.System_SByte, 96SpecialType.System_Int16, 97SpecialType.System_Single, 98SpecialType.System_String, 99SpecialType.System_UInt32, 100SpecialType.System_UInt64, 101SpecialType.System_UInt16} 111Dim specialType As SpecialType = DirectCast(s_intrinsicSpecialTypes(i), SpecialType) 125Private Shared Function GetDocumentationCommentText(context As VisualBasicSyntaxContext, type As SpecialType, cancellationToken As CancellationToken) As String
Completion\Providers\DefaultArgumentProvider.vb (13)
26Case SpecialType.System_Boolean 28Case SpecialType.System_Char 30Case SpecialType.System_Byte 32Case SpecialType.System_SByte 34Case SpecialType.System_Int16 36Case SpecialType.System_UInt16 38Case SpecialType.System_Int32 40Case SpecialType.System_UInt32 42Case SpecialType.System_Int64 44Case SpecialType.System_UInt64 46Case SpecialType.System_Decimal 48Case SpecialType.System_Single 50Case SpecialType.System_Double
ExtractMethod\Extensions.vb (1)
474Return type Is Nothing OrElse type.SpecialType = SpecialType.System_Object
ExtractMethod\VisualBasicMethodExtractor.VisualBasicCodeGenerator.ExpressionCodeGenerator.vb (1)
73If Me.AnalyzerResult.CoreReturnType.SpecialType <> SpecialType.System_Void Then
ExtractMethod\VisualBasicSelectionResult.vb (1)
179If If(info.Type?.SpecialType = SpecialType.System_String, False) AndAlso
src\Analyzers\VisualBasic\CodeFixes\GenerateParameterizedMember\VisualBasicGenerateParameterizedMemberService.vb (6)
43Return Me.Document.SemanticModel.Compilation.GetSpecialType(SpecialType.System_Int32) 45Return Me.Document.SemanticModel.Compilation.GetSpecialType(SpecialType.System_Int64) 47Return Me.Document.SemanticModel.Compilation.GetSpecialType(SpecialType.System_Decimal) 49Return Me.Document.SemanticModel.Compilation.GetSpecialType(SpecialType.System_Single) 51Return Me.Document.SemanticModel.Compilation.GetSpecialType(SpecialType.System_Double) 53Return Me.Document.SemanticModel.Compilation.GetSpecialType(SpecialType.System_String)
Microsoft.CodeAnalysis.VisualBasic.Features.UnitTests (10)
EditAndContinue\TopLevelEditingTests.vb (10)
3249SemanticEdit(SemanticEditKind.Delete, Function(c) c.GetMembers("S.C.F2").FirstOrDefault(Function(m) m.GetParameters().Any(Function(p) p.Type.SpecialType = SpecialType.System_Byte)), deletedSymbolContainerProvider:=Function(c) c.GetMember("S.C")) 3253SemanticEdit(SemanticEditKind.Insert, Function(c) c.GetMember(Of NamedTypeSymbol)("S").GetMember(Of NamedTypeSymbol)("C").GetMembers("F2").FirstOrDefault(Function(m) m.GetParameters().Any(Function(p) p.Type.SpecialType = SpecialType.System_Int32))) 4356semanticEdits:={SemanticEdit(SemanticEditKind.Update, Function(c) c.GetMembers("C.F").Single(Function(m) m.GetParameters()(0).Type.SpecialType = SpecialType.System_Char))}), 4358semanticEdits:={SemanticEdit(SemanticEditKind.Update, Function(c) c.GetMembers("C.F").Single(Function(m) m.GetParameters()(0).Type.SpecialType = SpecialType.System_Byte))}) 4394SemanticEdit(SemanticEditKind.Update, Function(c) DirectCast(c.GetMembers("C.P").Single(Function(m) m.GetParameters()(0).Type.SpecialType = SpecialType.System_Char), PropertySymbol).GetMethod), 4395SemanticEdit(SemanticEditKind.Update, Function(c) DirectCast(c.GetMembers("C.P").Single(Function(m) m.GetParameters()(0).Type.SpecialType = SpecialType.System_Char), PropertySymbol).SetMethod) 4400SemanticEdit(SemanticEditKind.Update, Function(c) DirectCast(c.GetMembers("C.P").Single(Function(m) m.GetParameters()(0).Type.SpecialType = SpecialType.System_Byte), PropertySymbol).GetMethod), 4401SemanticEdit(SemanticEditKind.Update, Function(c) DirectCast(c.GetMembers("C.P").Single(Function(m) m.GetParameters()(0).Type.SpecialType = SpecialType.System_Byte), PropertySymbol).SetMethod) 4658SemanticEdit(SemanticEditKind.Insert, Function(c) c.GetMembers("S.F").FirstOrDefault(Function(m) m.GetParameters().Any(Function(p) p.Type.SpecialType = SpecialType.System_Byte))) 4662SemanticEdit(SemanticEditKind.Delete, Function(c) c.GetMembers("S.F").FirstOrDefault(Function(m) m.GetParameters().Any(Function(p) p.Type.SpecialType = SpecialType.System_Int32)), deletedSymbolContainerProvider:=Function(c) c.GetMember("S"))
Microsoft.CodeAnalysis.VisualBasic.Scripting (17)
Hosting\ObjectFormatter\VisualBasicTypeNameFormatter.vb (17)
18Protected Overrides Function GetPrimitiveTypeName(type As SpecialType) As String 20Case SpecialType.System_Boolean 22Case SpecialType.System_Byte 24Case SpecialType.System_Char 26Case SpecialType.System_Decimal 28Case SpecialType.System_Double 30Case SpecialType.System_Int16 32Case SpecialType.System_Int32 34Case SpecialType.System_Int64 36Case SpecialType.System_SByte 38Case SpecialType.System_Single 40Case SpecialType.System_String 42Case SpecialType.System_UInt16 44Case SpecialType.System_UInt32 46Case SpecialType.System_UInt64 48Case SpecialType.System_DateTime 50Case SpecialType.System_Object
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (137)
Compilation\CompilationAPITests.vb (54)
326Dim ntSmb = comp.GetSpecialType(typeId:=SpecialType.Count) 327Assert.Equal(SpecialType.Count, ntSmb.SpecialType) 329ntSmb = comp.GetSpecialType(CType(31, SpecialType)) 406Assert.Equal(SpecialType.System_Array, comp.GetTypeByMetadataName("System.Array").SpecialType) 1345comp.GetSpecialType((SpecialType.None)) 1351comp.GetSpecialType(CType(0, SpecialType)) 1356comp.GetSpecialType(CType(100, SpecialType)) 1479Dim intType As TypeSymbol = comp.GetSpecialType(SpecialType.System_Int32) 1480Dim stringType As TypeSymbol = comp.GetSpecialType(SpecialType.System_String) 1495Dim intType As TypeSymbol = comp.GetSpecialType(SpecialType.System_Int32) 1496Dim stringType As TypeSymbol = comp.GetSpecialType(SpecialType.System_String) 1512Dim elementType = comp.GetSpecialType(SpecialType.System_Object) 1537Dim elementType = comp.GetSpecialType(SpecialType.System_Object) 1563ImmutableArray.Create(DirectCast(compilation.GetSpecialType(SpecialType.System_Int32), ITypeSymbol), 1564DirectCast(compilation.GetSpecialType(SpecialType.System_Int32), ITypeSymbol)), 1576ImmutableArray.Create(DirectCast(Compilation.GetSpecialType(SpecialType.System_Int32), ITypeSymbol), 1577DirectCast(Compilation.GetSpecialType(SpecialType.System_Int32), ITypeSymbol)), 1587ImmutableArray.Create(DirectCast(compilation.GetSpecialType(SpecialType.System_Int32), ITypeSymbol), 1588DirectCast(compilation.GetSpecialType(SpecialType.System_Int32), ITypeSymbol)), 1608ImmutableArray.Create(DirectCast(compilation.GetSpecialType(SpecialType.System_Int32), ITypeSymbol), 1609DirectCast(compilation.GetSpecialType(SpecialType.System_Int32), ITypeSymbol)), 1635ImmutableArray.Create(Of ITypeSymbol)(compilation.GetSpecialType(SpecialType.System_Int32)), 1649ImmutableArray.Create(Of ITypeSymbol)(compilation.GetSpecialType(SpecialType.System_Int32)), 1664ImmutableArray.Create(Of ITypeSymbol)(compilation.GetSpecialType(SpecialType.System_Int32), compilation.GetSpecialType(SpecialType.System_Boolean)), 1678Dim memberTypes = ImmutableArray.Create(Of ITypeSymbol)(comp.GetSpecialType(SpecialType.System_Object), comp.GetSpecialType(SpecialType.System_String)) 1716Dim memberTypes = ImmutableArray.Create(Of ITypeSymbol)(comp.GetSpecialType(SpecialType.System_Object), comp.GetSpecialType(SpecialType.System_String)) 1747Dim intType = compilation.GetSpecialType(SpecialType.System_Int32) 1762Dim intType = compilation.GetSpecialType(SpecialType.System_Int32) 1763Dim boolType = compilation.GetSpecialType(SpecialType.System_Boolean) 1772Dim stringType = compilation.GetSpecialType(SpecialType.System_String) 1781Dim stringType = compilation.GetSpecialType(SpecialType.System_String) 1782Dim boolType = compilation.GetSpecialType(SpecialType.System_Boolean) 1793Dim doubleType = compilation.GetSpecialType(SpecialType.System_Double) 1809Dim intType = compilation.GetSpecialType(SpecialType.System_Int32) 1818Dim intType = compilation.GetSpecialType(SpecialType.System_Int32) 1819Dim nullableIntType = compilation.GetSpecialType(SpecialType.System_Nullable_T).Construct(intType) 1840Dim intType = compilation.GetSpecialType(SpecialType.System_Int32) 1852Dim intType = compilation.GetSpecialType(SpecialType.System_Int32) 1861Dim intType = compilation.GetSpecialType(SpecialType.System_Int32) 1862Dim nullableIntType = compilation.GetSpecialType(SpecialType.System_Nullable_T).Construct(intType) 1896Dim intType = compilation.GetSpecialType(SpecialType.System_Int32) 1905Dim intType = compilation.GetSpecialType(SpecialType.System_Int32) 1918Dim intType = Compilation.GetSpecialType(SpecialType.System_Int32) 1943Dim typeArguments = ImmutableArray.Create(Of ITypeSymbol)(comp.GetSpecialType(SpecialType.System_Object), comp.GetSpecialType(SpecialType.System_String)) 1961typeArguments = ImmutableArray.Create(Of ITypeSymbol)(comp.GetSpecialType(SpecialType.System_Object), comp.GetSpecialType(SpecialType.System_String)) 1975Dim typeArguments = ImmutableArray.Create(Of ITypeSymbol)(comp.GetSpecialType(SpecialType.System_Object), comp.GetSpecialType(SpecialType.System_String)) 1993typeArguments = ImmutableArray.Create(Of ITypeSymbol)(comp.GetSpecialType(SpecialType.System_Object), comp.GetSpecialType(SpecialType.System_String))
Compilation\SemanticModelGetDeclaredSymbolAPITests.vb (1)
6Imports Microsoft.CodeAnalysis.SpecialType
Semantics\AccessCheckTests.vb (1)
791Assert.Equal(sourceAssem.GetSpecialType(SpecialType.System_Object), sourceAssem.ObjectType)
Semantics\BinaryOperators.vb (26)
978types(types.Length - 1) = compilation.GetSpecialType(SpecialType.System_String) 1032If (leftType.SpecialType <> SpecialType.System_Object AndAlso 1034(rightType.SpecialType <> SpecialType.System_Object AndAlso 1084Dim leftSpecial As SpecialType = leftType.GetEnumUnderlyingTypeOrSelf().SpecialType 1085Dim rightSpecial As SpecialType = rightType.GetEnumUnderlyingTypeOrSelf().SpecialType 1087Dim resultType As SpecialType = OverloadResolution.ResolveNotLiftedIntrinsicBinaryOperator(op, leftSpecial, rightSpecial) 1091If resultType = SpecialType.None AndAlso 1092(leftSpecial = SpecialType.None OrElse rightSpecial = SpecialType.None OrElse 1093(op = BinaryOperatorKind.Subtract AndAlso leftSpecial = SpecialType.System_DateTime AndAlso rightSpecial = SpecialType.System_DateTime)) Then 1095If leftSpecial = SpecialType.System_Object OrElse rightSpecial = SpecialType.System_Object OrElse TypeSymbol.Equals(leftType, rightType, TypeCompareKind.ConsiderEverything) Then 1096If leftSpecial = SpecialType.System_Object OrElse rightSpecial = SpecialType.System_Object Then 1097resultType = SpecialType.System_Object 1100Dim nonSpecialType = If(leftSpecial = SpecialType.System_Object, rightType, leftType) 1110resultType = SpecialType.None 1124If resultType = SpecialType.None Then 1179If resultType <> SpecialType.System_Object Then 1180returnName = compilation.GetSpecialType(SpecialType.System_Boolean).ToTestDisplayString() 1184If resultType <> SpecialType.System_Object Then 1185rightName = compilation.GetSpecialType(SpecialType.System_Int32).ToTestDisplayString() 1199If(op = BinaryOperatorKind.Add AndAlso resultType = SpecialType.System_String, 1208If(op = BinaryOperatorKind.Add AndAlso resultType = SpecialType.System_String, 1216If op = BinaryOperatorKind.Add AndAlso resultType = SpecialType.System_String Then
Semantics\Conversions.vb (6)
7Imports Microsoft.CodeAnalysis.SpecialType 455If type2.IsEnumType() AndAlso type1.SpecialType = SpecialType.System_Int32 Then 2197Private Function HasBuiltInWideningConversions(from As SpecialType, [to] As SpecialType) As ConversionKind 2316Private Function HasBuiltInNarrowingConversions(from As SpecialType, [to] As SpecialType) As ConversionKind
Semantics\ForeachTest.vb (7)
1165Assert.Equal(SpecialType.System_Object, loopInfo.CurrentProperty.Type.SpecialType) 1169Assert.Equal(SpecialType.System_Char, typeInfo.Type.SpecialType) 1205Assert.Equal(SpecialType.System_Object, loopInfo.CurrentProperty.Type.SpecialType) 1209Assert.Equal(SpecialType.System_Char, typeInfo.Type.SpecialType) 1253Assert.Equal(comp.GetSpecialType(SpecialType.System_Array), loopInfo0.GetEnumeratorMethod.ContainingType) ' Unlike C#, the spec doesn't say that arrays use IEnumerable 1257Assert.Equal(SpecialType.System_String, loopInfo0.ElementType.SpecialType) 1266Assert.Equal(SpecialType.System_Object, loopInfo1.ElementType.SpecialType) ' No longer string.
Semantics\GetExtendedSemanticInfoTests.vb (3)
8Imports Microsoft.CodeAnalysis.SpecialType 1957Assert.Equal(SpecialType.System_Void, semanticInfo.Type.SpecialType) 1958Assert.Equal(SpecialType.System_Void, semanticInfo.ConvertedType.SpecialType)
Semantics\GetSemanticInfoTests.vb (22)
3780Assert.Equal(info.Type.SpecialType, SpecialType.System_Object) 3791Assert.Equal(info.Type.SpecialType, SpecialType.System_Object) 4515Assert.Equal(SpecialType.System_Collections_Generic_ICollection_T, CType(reducedFrom1.Parameters(0).Type.OriginalDefinition, TypeSymbol).SpecialType) 4526Assert.Equal(SpecialType.System_Collections_Generic_ICollection_T, CType(reducedFrom2.Parameters(0).Type.OriginalDefinition, TypeSymbol).SpecialType) 5717Dim otherFuncType = comp.GetWellKnownType(WellKnownType.System_Func_T).Construct(comp.GetSpecialType(SpecialType.System_Int32)) 5732Dim otherFuncType = comp.GetWellKnownType(WellKnownType.System_Func_T).Construct(comp.GetSpecialType(SpecialType.System_Int32)) 5939Dim typeInt = comp.GetSpecialType(SpecialType.System_Int32) 6146Assert.Equal(SpecialType.System_Boolean, model.GetTypeInfo(expr).Type.SpecialType) 6151Assert.Equal(SpecialType.System_Boolean, model.GetTypeInfo(expr).Type.SpecialType) 6208Assert.Equal(SpecialType.System_Boolean, model.GetTypeInfo(expr).Type.SpecialType) 6213Assert.Equal(SpecialType.System_Boolean, model.GetTypeInfo(expr).Type.SpecialType) 6218Assert.Equal(SpecialType.System_Object, model.GetTypeInfo(expr).Type.SpecialType) 6248Assert.Equal(SpecialType.System_Boolean, model.GetTypeInfo(expr).Type.SpecialType) 6278Assert.Equal(SpecialType.System_Boolean, model.GetTypeInfo(expr).Type.SpecialType) 6308Assert.Equal(SpecialType.System_Boolean, model.GetTypeInfo(expr).Type.SpecialType) 6346Assert.Equal(SpecialType.System_Boolean, model.GetTypeInfo(expr).Type.SpecialType) 6359Dim type = CType(SpecialType.None - 1, SpecialType) 6368Assert.StartsWith(expectedStartString:=$"Unexpected SpecialType: '{SpecialType.None - 1}'.", actualString:=ex.Message) 6384Dim type = CType(SpecialType.Count + 1, SpecialType) 6393Assert.StartsWith(expectedStartString:=$"Unexpected SpecialType: '{SpecialType.Count + 1}'.", actualString:=ex.Message)
Semantics\InterpolatedStringTests.vb (9)
378Dim stringType = compilation.GetSpecialType(SpecialType.System_String) 429Dim stringType = compilation.GetSpecialType(SpecialType.System_String) 771Dim stringType = compilation.GetSpecialType(SpecialType.System_String) 822Dim stringType = compilation.GetSpecialType(SpecialType.System_String) 878Dim stringType = compilation.GetSpecialType(SpecialType.System_String) 879Dim objectType = compilation.GetSpecialType(SpecialType.System_Object) 935Dim stringType = compilation.GetSpecialType(SpecialType.System_String) 936Dim objectType = compilation.GetSpecialType(SpecialType.System_Object) 993Dim stringType = compilation.GetSpecialType(SpecialType.System_String)
Semantics\NativeIntegerTests.vb (2)
51Assert.Equal(If(signed, SpecialType.System_IntPtr, SpecialType.System_UIntPtr), type.SpecialType)
Semantics\OverloadResolution.vb (2)
9Imports Microsoft.CodeAnalysis.SpecialType 2510Dim prev As SpecialType = 0
Semantics\TypeOfTests.vb (1)
763Assert.Equal(SpecialType.System_Object, typeInfo.ConvertedType.SpecialType)
Semantics\UnaryOperators.vb (3)
718Dim special As SpecialType = type.GetEnumUnderlyingTypeOrSelf().SpecialType 720Dim resultType As SpecialType = OverloadResolution.ResolveNotLiftedIntrinsicUnaryOperator(op, special) 722If resultType = SpecialType.None Then
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (214)
DocumentationComments\DocCommentTests.vb (4)
4899TestSymbolAndTypeInfoForType(model, names(0), compilation.GetSpecialType(SpecialType.System_UInt16)) 4900TestSymbolAndTypeInfoForType(model, names(1), compilation.GetSpecialType(SpecialType.System_UInt16)) 4927TestSymbolAndTypeInfoForType(model, names(0), compilation.GetSpecialType(SpecialType.System_String)) 4928TestSymbolAndTypeInfoForType(model, names(1), compilation.GetSpecialType(SpecialType.System_String))
SymbolsTests\AssemblyAndNamespaceTests.vb (3)
521Dim objectType = comp.GetSpecialType(SpecialType.System_Object) 525Assert.Equal(objectType, comp.Assembly.GetSpecialType(SpecialType.System_Object)) 526Assert.Equal(objectType, comp.Assembly.CorLibrary.GetSpecialType(SpecialType.System_Object))
SymbolsTests\CompilationCreationTests.vb (10)
92Assert.Equal(SpecialType.None, c107.SpecialType) 94For i As Integer = 1 To SpecialType.Count Step 1 95Dim type As NamedTypeSymbol = c1.Assembly.GetSpecialType(CType(i, SpecialType)) 97If i = SpecialType.System_Runtime_CompilerServices_RuntimeFeature OrElse 98i = SpecialType.System_Runtime_CompilerServices_PreserveBaseOverridesAttribute OrElse 99i = SpecialType.System_Runtime_CompilerServices_InlineArrayAttribute Then 105Assert.Equal(CType(i, SpecialType), type.SpecialType) 108Assert.Equal(SpecialType.None, c107.SpecialType) 112Assert.Equal(SpecialType.None, arrayOfc107.SpecialType) 116Assert.Equal(SpecialType.None, c2.GlobalNamespace.GetTypeMembers("C107").Single().SpecialType)
SymbolsTests\CorLibrary\Choosing.vb (4)
39Dim obj = corLib.GetSpecialType(SpecialType.System_Object) 54Assert.Same(obj, consumer.GetSpecialType(SpecialType.System_Object)) 69Dim obj = corLib.GetSpecialType(SpecialType.System_Object) 81Assert.True(consumer.GetSpecialType(SpecialType.System_Object).IsErrorType())
SymbolsTests\CorLibrary\CorTypes.vb (30)
22For i As Integer = 1 To SpecialType.Count 23Dim t = noMsCorLibRef.GetSpecialType(CType(i, SpecialType)) 24Assert.Equal(CType(i, SpecialType), t.SpecialType) 33Assert.Equal(SpecialType.None, t.SpecialType) 45Assert.Equal(SpecialType.System_Int32, p.SpecialType) 53Dim knownMissingTypes As HashSet(Of Integer) = New HashSet(Of Integer) From {SpecialType.System_Runtime_CompilerServices_InlineArrayAttribute} 55For i As Integer = 1 To SpecialType.Count 56Dim t = msCorLibRef.GetSpecialType(CType(i, SpecialType)) 57Assert.Equal(CType(i, SpecialType), t.SpecialType) 70Assert.Equal(SpecialType.None, t.SpecialType) 99ElseIf (DirectCast(m, NamedTypeSymbol).SpecialType <> SpecialType.None) Then 103If (count >= SpecialType.Count) Then 109Assert.Equal(count + knownMissingTypes.Count, CType(SpecialType.Count, Integer)) 118For i As Integer = 1 To SpecialType.Count 120Dim t = msCorLibRef.GetSpecialType(CType(i, SpecialType)) 121Assert.Equal(CType(i, SpecialType), t.SpecialType) 124If (t.SpecialType = SpecialType.System_Object) Then 136Assert.Equal(SpecialType.None, t.SpecialType) 162For i As Integer = 1 To SpecialType.Count 163If (i <> SpecialType.System_Object) Then 165Dim t = c1.Assembly.GetSpecialType(CType(i, SpecialType)) 166Assert.Equal(CType(i, SpecialType), t.SpecialType) 177Assert.Equal(SpecialType.None, t.SpecialType) 187Assert.Equal(SpecialType.System_Object, system_object.SpecialType) 191Assert.Same(system_object, c1.Assembly.GetSpecialType(SpecialType.System_Object)) 193Assert.Throws(Of ArgumentOutOfRangeException)(Function() c1.GetSpecialType(SpecialType.None)) 194Assert.Throws(Of ArgumentOutOfRangeException)(Function() DirectCast(c1, Compilation).GetSpecialType(SpecialType.None)) 196Assert.Throws(Of ArgumentOutOfRangeException)(Function() DirectCast(c1, Compilation).GetSpecialType(CType(SpecialType.Count + 1, SpecialType))) 197Assert.Throws(Of ArgumentOutOfRangeException)(Function() msCorLibRef.GetSpecialType(SpecialType.None))
SymbolsTests\ExtensionMethods\ExtensionMethodTests.vb (1)
2563Dim reducedMethodOnVoid = extensionMethod.ReduceExtensionMethod(compilation.GetSpecialType(SpecialType.System_Void))
SymbolsTests\InstantiatingGenerics.vb (4)
465Dim int = compilation.GetSpecialType(SpecialType.System_Int32) 687Dim int = compilation.GetSpecialType(SpecialType.System_Int32) 688Dim bte = compilation.GetSpecialType(SpecialType.System_Byte) 689Dim chr = compilation.GetSpecialType(SpecialType.System_Char)
SymbolsTests\Metadata\PE\BaseTypeResolution.vb (2)
295Assert.Equal("System.Object", DirectCast(c1.Assembly.Modules(0), SourceModuleSymbol).GetCorLibType(SpecialType.System_Object).ToTestDisplayString()) 300Assert.Equal("System.Object[missing]", DirectCast(c2.Assembly.Modules(0), SourceModuleSymbol).GetCorLibType(SpecialType.System_Object).ToTestDisplayString())
SymbolsTests\Metadata\PE\LoadingEvents.vb (2)
116Assert.Equal(SpecialType.System_Void, accessor.ReturnType.SpecialType) 148Assert.Equal(SpecialType.System_Int32, nonDelegateEvent.Type.SpecialType)
SymbolsTests\Metadata\PE\LoadingFields.vb (2)
56Assert.Same(DirectCast(module2, PEModuleSymbol).GetCorLibType(SpecialType.System_Int32), f2.Type) 281Assert.Equal(SpecialType.None, readOnlySpanType.SpecialType)
SymbolsTests\Metadata\PE\LoadingOperators.vb (1)
2794Dim nullable = compilation.GetSpecialType(SpecialType.System_Nullable_T)
SymbolsTests\Metadata\PE\MissingTypeReferences.vb (4)
418Assert.Equal(asm1.GetSpecialType(SpecialType.System_Boolean), asm1.GetSpecialType(SpecialType.System_Boolean)) 419Assert.Equal(asm2.GetSpecialType(SpecialType.System_Boolean), asm1.GetSpecialType(SpecialType.System_Boolean))
SymbolsTests\Metadata\WinMdEventTest.vb (2)
1602Dim voidType = compilation.GetSpecialType(SpecialType.System_Void) 1629Dim voidType = compilation.GetSpecialType(SpecialType.System_Void)
SymbolsTests\Retargeting\RetargetCustomModifiers.vb (1)
111Assert.Equal(SpecialType.System_Int32, volatileFld.[Type].SpecialType)
SymbolsTests\Retargeting\RetargetingTests.vb (20)
362Assert.Equal(SpecialType.System_Enum, sourceType.BaseType.SpecialType) 364Assert.Equal(SpecialType.System_Int32, sourceType.EnumUnderlyingType.SpecialType) 371Assert.Equal(SpecialType.System_Enum, retargetingType.BaseType.SpecialType) 373Assert.Equal(SpecialType.System_Int32, retargetingType.EnumUnderlyingType.SpecialType) 400Assert.Equal(SpecialType.System_Enum, sourceType.BaseType.SpecialType) 402Assert.Equal(SpecialType.System_Int16, sourceType.EnumUnderlyingType.SpecialType) 409Assert.Equal(SpecialType.System_Enum, retargetingType.BaseType.SpecialType) 411Assert.Equal(SpecialType.System_Int16, retargetingType.EnumUnderlyingType.SpecialType) 433Assert.Equal(SpecialType.System_Object, sourceType.BaseType.SpecialType) 438Assert.Equal(SpecialType.System_Object, retargetingType.BaseType.SpecialType) 473Assert.Equal(SpecialType.System_Object, sourceType.BaseType.SpecialType) 478Assert.Equal(SpecialType.System_Object, retargetingType.BaseType.SpecialType) 500Assert.Equal(SpecialType.System_ValueType, sourceType.BaseType.SpecialType) 505Assert.Equal(SpecialType.System_ValueType, retargetingType.BaseType.SpecialType) 540Assert.Equal(SpecialType.System_ValueType, sourceType.BaseType.SpecialType) 546Assert.Equal(SpecialType.System_ValueType, retargetingType.BaseType.SpecialType) 632Assert.Equal(SpecialType.System_Int16, sourceTypeParameterConstraint.SpecialType) 638Assert.Equal(SpecialType.System_Int16, retargetingTypeParameterConstraint.SpecialType) 674Assert.Equal(SpecialType.System_Int16, sourceTypeParameterConstraint.SpecialType) 681Assert.Equal(SpecialType.System_Int16, retargetingTypeParameterConstraint.SpecialType)
SymbolsTests\Source\BaseClassTests.vb (3)
2289Dim typeC = comp.GlobalNamespace.GetMember(Of NamedTypeSymbol)("C").Construct(comp.GetSpecialType(SpecialType.System_Int32)) 2324Dim typeC = comp.GlobalNamespace.GetMember(Of NamedTypeSymbol)("C").Construct(comp.GetSpecialType(SpecialType.System_Int32)) 2354Dim typeC = comp.GlobalNamespace.GetMember(Of NamedTypeSymbol)("C").Construct(comp.GetSpecialType(SpecialType.System_Int32))
SymbolsTests\Source\ClsComplianceTests.vb (12)
2560Dim integerType = helper.GetSpecialType(SpecialType.System_Int32) 2562For Each st As SpecialType In [Enum].GetValues(GetType(SpecialType)) 2564Case SpecialType.None, SpecialType.System_Void, SpecialType.System_Runtime_CompilerServices_IsVolatile 2578Case SpecialType.System_SByte, SpecialType.System_UInt16, SpecialType.System_UInt32, SpecialType.System_UInt64, SpecialType.System_UIntPtr, SpecialType.System_TypedReference
SymbolsTests\Source\DelegateTests.vb (2)
248Assert.Equal(compilation.GetSpecialType(SpecialType.System_Object), ctor.Parameters(0).Type) 249Assert.Equal(compilation.GetSpecialType(SpecialType.System_IntPtr), ctor.Parameters(1).Type)
SymbolsTests\Source\EnumTests.vb (13)
107Dim fields = VerifyEnumsValue(text, "Suits", SpecialType.System_Byte, Nothing, CByte(2), Nothing) 134fields = VerifyEnumsValue(text, "Suits", SpecialType.System_Byte, Nothing, CByte(2), Nothing) 163fields = VerifyEnumsValue(text, "Suits", SpecialType.System_Int16, CShort(0), CShort(1), CShort(2), Nothing, Nothing, Nothing) 256VerifyEnumsValue(text, "c1.EnumTest", SpecialType.System_Int32, Nothing, Nothing) 818VerifyEnumsValue(comp, "c1.COLORS", SpecialType.System_UInt32, 0UI, 1UI, 2UI) 842VerifyEnumsValue(comp, "Figure", SpecialType.System_Int32, 0, 1, 2) 862VerifyEnumsValue(comp, "Figure", SpecialType.System_Int64, CLng(0), CLng(1), CLng(2)) 883VerifyEnumsValue(comp, "Figure", SpecialType.System_Int32, 0, 1, 2) 1209Assert.Equal(type.SpecialType, SpecialType.System_Int32) 1347Return VerifyEnumsValue(comp, enumName, If(expectedEnumValues.Any() AndAlso expectedEnumValues.First().GetType() Is GetType(Long), SpecialType.System_Int64, SpecialType.System_Int32), expectedEnumValues) 1350Private Shared Function VerifyEnumsValue(text As XElement, enumName As String, underlyingType As SpecialType, ParamArray expectedEnumValues As Object()) As List(Of Symbol) 1355Private Shared Function VerifyEnumsValue(comp As VisualBasicCompilation, enumName As String, underlyingType As SpecialType, ParamArray expectedEnumValues As Object()) As List(Of Symbol)
SymbolsTests\Source\FieldTests.vb (9)
106Assert.Same(sourceMod.GetCorLibType(SpecialType.System_Nullable_T), fieldP.Type.OriginalDefinition) 107Assert.Same(sourceMod.GetCorLibType(SpecialType.System_Char), DirectCast(fieldP.Type, NamedTypeSymbol).TypeArguments(0)) 114Assert.Same(sourceMod.GetCorLibType(SpecialType.System_Char), fieldQ.Type) 121Assert.Same(sourceMod.GetCorLibType(SpecialType.System_Object), fieldR.Type) 128Assert.Same(sourceMod.GetCorLibType(SpecialType.System_Int64), fieldS.Type) 135Assert.Same(sourceMod.GetCorLibType(SpecialType.System_Int32), fieldT.Type) 143Assert.Same(sourceMod.GetCorLibType(SpecialType.System_Decimal), DirectCast(fieldU.Type, ArrayTypeSymbol).ElementType) 165Assert.Same(sourceMod.GetCorLibType(SpecialType.System_UInt32), fieldL.Type) 528Dim substitutedType = type.Construct(compilation.GetSpecialType(SpecialType.System_Int32))
SymbolsTests\Source\ImplementsTests.vb (17)
1729Dim ifooTypeSayWithString = (From m In ifooMethods Where m.Parameters(0).Type.SpecialType = SpecialType.System_String).First() 1730Dim ifooTypeSayWithInt = (From m In ifooMethods Where m.Parameters(0).Type.SpecialType = SpecialType.System_Int32).First() 2213Dim ifooTypeStyleWithString = (From m In ifooProps Where m.Parameters(0).Type.SpecialType = SpecialType.System_String).First() 2215Dim ifooTypeStyleWithInt = (From m In ifooProps Where m.Parameters(0).Type.SpecialType = SpecialType.System_Int32).First() 2305Dim ifooTypeSayWithString = (From m In ifooMethods Where m.Parameters(0).Type.SpecialType = SpecialType.System_String).First() 2306Dim ifooTypeSayWithInt = (From m In ifooMethods Where m.Parameters(0).Type.SpecialType = SpecialType.System_Int32).First() 2307Dim ifooTypeSayWithLong = (From m In ifooMethods Where m.Parameters(0).Type.SpecialType = SpecialType.System_Int64).First() 2394Dim ifooTypeStyleWithString = (From m In ifooProps Where m.Parameters(0).Type.SpecialType = SpecialType.System_String).First() 2396Dim ifooTypeStyleWithInt = (From m In ifooProps Where m.Parameters(0).Type.SpecialType = SpecialType.System_Int32).First() 2398Dim ifooTypeStyleWithLong = (From m In ifooProps Where m.Parameters(0).Type.SpecialType = SpecialType.System_Int64).First() 2476Dim ifooTypeSayWithInt = (From m In ifooMethods Where m.Parameters(0).Type.SpecialType = SpecialType.System_Int32).First() 2525Dim listOfString = listOfT.Construct(comp.GetSpecialType(SpecialType.System_String)) 2528Dim outerOfInt = outerOfX.Construct(comp.GetSpecialType(SpecialType.System_Int32)) 2537Dim iFooOfIntIntListOfString = iFooOfIntTU.Construct(comp.GetSpecialType(SpecialType.System_Int32), listOfString) 2539Dim fooOfIntString = fooOfIntY.Construct(comp.GetSpecialType(SpecialType.System_String)) 2542Dim ifooOfIntIntStringSay1 = (From m In iFooOfIntIntListOfStringMethods Where TypeSymbol.Equals(m.Parameters(0).Type, comp.GetSpecialType(SpecialType.System_Int32), TypeCompareKind.ConsiderEverything)).First() 2543Dim ifooOfIntIntStringSay2 = (From m In iFooOfIntIntListOfStringMethods Where Not TypeSymbol.Equals(m.Parameters(0).Type, comp.GetSpecialType(SpecialType.System_Int32), TypeCompareKind.ConsiderEverything)).First()
SymbolsTests\Source\MethodTests.vb (15)
676Dim constructedC = classC.Construct((New TypeSymbol() {compilation.GetSpecialType(SpecialType.System_Int32)}).AsImmutableOrNull()) 751Dim constructedM1 = m1.Construct((New TypeSymbol() {compilation.GetSpecialType(SpecialType.System_String), compilation.GetSpecialType(SpecialType.System_Boolean)}).AsImmutableOrNull()) 762Assert.Throws(Of InvalidOperationException)(Sub() constructedM1.Construct((New TypeSymbol() {compilation.GetSpecialType(SpecialType.System_String), compilation.GetSpecialType(SpecialType.System_Boolean)}).AsImmutableOrNull())) 766Dim constructedM1WrongArity = m1.Construct((New TypeSymbol() {compilation.GetSpecialType(SpecialType.System_String)}).AsImmutableOrNull()) 778constructedM1 = m1.Construct((New TypeSymbol() {compilation.GetSpecialType(SpecialType.System_String), compilation.GetSpecialType(SpecialType.System_Boolean)}).AsImmutableOrNull()) 780Assert.Throws(Of InvalidOperationException)(Sub() constructedM1.Construct((New TypeSymbol() {compilation.GetSpecialType(SpecialType.System_String), compilation.GetSpecialType(SpecialType.System_Boolean)}).AsImmutableOrNull())) 781Dim constructedM1_2 = m1.Construct(compilation.GetSpecialType(SpecialType.System_Byte), compilation.GetSpecialType(SpecialType.System_Boolean)) 782Dim constructedM1_3 = m1.Construct((New TypeSymbol() {compilation.GetSpecialType(SpecialType.System_String), compilation.GetSpecialType(SpecialType.System_Boolean)}).AsImmutableOrNull()) 797Dim constructedM3 = m3.Construct(compilation.GetSpecialType(SpecialType.System_String))
SymbolsTests\Source\OverridesTests.vb (9)
2491Dim x1StringArgGetter = (From meth In x1Getters Let params = meth.Parameters Where params.Length = 1 AndAlso params(0).Type.SpecialType = SpecialType.System_String Select meth).First() 2494Dim x1LongArgGetter = (From meth In x1Getters Let params = meth.Parameters Where params.Length = 1 AndAlso params(0).Type.SpecialType = SpecialType.System_Int64 Select meth).First() 2501Dim x2LongArgGetter = (From meth In x2Getters Let params = meth.Parameters Where params.Length = 1 AndAlso params(0).Type.SpecialType = SpecialType.System_Int64 Select meth).First() 2504Dim x2DoubleArgGetter = (From meth In x2Getters Let params = meth.Parameters Where params.Length = 1 AndAlso params(0).Type.SpecialType = SpecialType.System_Double Select meth).First() 2511Dim x1StringArgSetter = (From meth In x1Setters Let params = meth.Parameters Where params.Length = 2 AndAlso params(0).Type.SpecialType = SpecialType.System_String Select meth).First() 2514Dim x1LongArgSetter = (From meth In x1Setters Let params = meth.Parameters Where params.Length = 2 AndAlso params(0).Type.SpecialType = SpecialType.System_Int64 Select meth).First() 2521Dim x2LongArgSetter = (From meth In x2Setters Let params = meth.Parameters Where params.Length = 2 AndAlso params(0).Type.SpecialType = SpecialType.System_Int64 Select meth).First() 2524Dim x2DoubleArgSetter = (From meth In x2Setters Let params = meth.Parameters Where params.Length = 2 AndAlso params(0).Type.SpecialType = SpecialType.System_Double Select meth).First() 2542Dim obj = compilation.GetSpecialType(SpecialType.System_Object)
SymbolsTests\Source\PropertyTests.vb (19)
783Assert.Equal(SpecialType.System_Object, [property].Type.SpecialType) 784Assert.Equal(SpecialType.System_Int32, [property].Parameters(0).Type.SpecialType) 786Assert.Equal(SpecialType.System_Int32, [property].GetMethod.Parameters(0).Type.SpecialType) 788Assert.Equal(SpecialType.System_Int32, [property].SetMethod.Parameters(0).Type.SpecialType) 789Assert.Equal(SpecialType.System_Object, [property].SetMethod.Parameters(1).Type.SpecialType) 855Assert.Equal(SpecialType.System_String, P2s.ElementAt(1).Type.SpecialType) 3797Assert.Equal(SpecialType.System_Int32, bindings.GetSpeculativeSemanticInfoSummary(position, SyntaxFactory.ParseExpression("Goo().Items(1)"), SpeculativeBindingOption.BindAsExpression).Type.SpecialType) 3798Assert.Equal(SpecialType.System_Int32, bindings.GetSpeculativeSemanticInfoSummary(position, SyntaxFactory.ParseExpression("Goo.Items(1)"), SpeculativeBindingOption.BindAsExpression).Type.SpecialType) 3799Assert.Equal(SpecialType.System_Int32, bindings.GetSpeculativeSemanticInfoSummary(position, SyntaxFactory.ParseExpression("Goo()(1)"), SpeculativeBindingOption.BindAsExpression).Type.SpecialType) 3800Assert.Equal(SpecialType.System_Int32, bindings.GetSpeculativeSemanticInfoSummary(position, SyntaxFactory.ParseExpression("Goo(1)"), SpeculativeBindingOption.BindAsExpression).Type.SpecialType) 3801Assert.Equal(SpecialType.System_Int32, bindings.GetSpeculativeSemanticInfoSummary(position, SyntaxFactory.ParseExpression("dd.Item(1)"), SpeculativeBindingOption.BindAsExpression).Type.SpecialType) 3802Assert.Equal(SpecialType.System_Int32, bindings.GetSpeculativeSemanticInfoSummary(position, SyntaxFactory.ParseExpression("Bar(1)"), SpeculativeBindingOption.BindAsExpression).Type.SpecialType) 4343Assert.Equal(SpecialType.System_Object, propertiesDictionary!Typeless.Type.SpecialType) 4344Assert.Equal(SpecialType.System_String, propertiesDictionary!StringType.Type.SpecialType) 4345Assert.Equal(SpecialType.System_Int32, propertiesDictionary!IntegerType.Type.SpecialType) 4346Assert.Equal(SpecialType.System_Int64, propertiesDictionary!LongType.Type.SpecialType) 4347Assert.Equal(SpecialType.System_Decimal, propertiesDictionary!DecimalType.Type.SpecialType) 4348Assert.Equal(SpecialType.System_Single, propertiesDictionary!SingleType.Type.SpecialType) 4349Assert.Equal(SpecialType.System_Double, propertiesDictionary!DoubleType.Type.SpecialType)
SymbolsTests\Source\TypeBindingTests.vb (7)
40Assert.Same(sourceMod.GetCorLibType(SpecialType.System_Int32), arrayTypeA.ElementType) 41Assert.Same(sourceMod.GetCorLibType(SpecialType.System_Array), arrayTypeA.BaseType) 52Assert.Same(sourceMod.GetCorLibType(SpecialType.System_String), arrayTypeB3.ElementType) 81Assert.Same(sourceMod.GetCorLibType(SpecialType.System_Nullable_T), namedTypeA.OriginalDefinition) 82Assert.Same(sourceMod.GetCorLibType(SpecialType.System_Int32), namedTypeA.TypeArguments(0)) 223Assert.Same(sourceMod.GetCorLibType(SpecialType.System_Int32), fieldB.Type) 437Assert.Same(sourceMod.GetCorLibType(SpecialType.System_Int32), containerTypeB.TypeArguments(0))
SymbolsTests\Source\TypeTests.vb (3)
4033Dim modifiers = ImmutableArray.Create(VisualBasicCustomModifier.CreateOptional(compilation.GetSpecialType(SpecialType.System_Object))) 4097Dim modifiers = ImmutableArray.Create(VisualBasicCustomModifier.CreateOptional(compilation.GetSpecialType(SpecialType.System_Object))) 4158Dim modifiers = ImmutableArray.Create(VisualBasicCustomModifier.CreateOptional(compilation.GetSpecialType(SpecialType.System_Object)))
SymbolsTests\TypedConstantTests.vb (2)
23_namedType = _compilation.GetSpecialType(SpecialType.System_Byte) 25_arrayType = _compilation.CreateArrayTypeSymbol(_compilation.GetSpecialType(SpecialType.System_Object))
SymbolsTests\WellKnownTypeValidationTests.vb (13)
37Dim special = comp.GetSpecialType(SpecialType.System_String) 39Assert.Equal(SpecialType.System_String, special.SpecialType) 44Assert.Equal(SpecialType.None, lookup.SpecialType) 121Dim special = comp.GetSpecialType(SpecialType.System_Nullable_T) 123Assert.Equal(SpecialType.System_Nullable_T, special.SpecialType) 127Assert.Equal(SpecialType.System_Nullable_T, lookup.SpecialType) 453For special As SpecialType = CType(SpecialType.None + 1, SpecialType) To SpecialType.Count 457If special = SpecialType.System_Runtime_CompilerServices_RuntimeFeature OrElse 458special = SpecialType.System_Runtime_CompilerServices_PreserveBaseOverridesAttribute OrElse 459special = SpecialType.System_Runtime_CompilerServices_InlineArrayAttribute Then
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (15)
Syntax\ConstantExpressionEvaluatorTests.vb (15)
12Assert.Equal(ConstantValueTypeDiscriminator.SByte, SpecialType.System_SByte.ToConstantValueDiscriminator()) 13Assert.Equal(ConstantValueTypeDiscriminator.Byte, SpecialType.System_Byte.ToConstantValueDiscriminator()) 14Assert.Equal(ConstantValueTypeDiscriminator.Int16, SpecialType.System_Int16.ToConstantValueDiscriminator()) 15Assert.Equal(ConstantValueTypeDiscriminator.UInt16, SpecialType.System_UInt16.ToConstantValueDiscriminator()) 16Assert.Equal(ConstantValueTypeDiscriminator.Int32, SpecialType.System_Int32.ToConstantValueDiscriminator()) 17Assert.Equal(ConstantValueTypeDiscriminator.UInt32, SpecialType.System_UInt32.ToConstantValueDiscriminator()) 18Assert.Equal(ConstantValueTypeDiscriminator.Int64, SpecialType.System_Int64.ToConstantValueDiscriminator()) 19Assert.Equal(ConstantValueTypeDiscriminator.UInt64, SpecialType.System_UInt64.ToConstantValueDiscriminator()) 20Assert.Equal(ConstantValueTypeDiscriminator.Char, SpecialType.System_Char.ToConstantValueDiscriminator()) 21Assert.Equal(ConstantValueTypeDiscriminator.Boolean, SpecialType.System_Boolean.ToConstantValueDiscriminator()) 22Assert.Equal(ConstantValueTypeDiscriminator.Single, SpecialType.System_Single.ToConstantValueDiscriminator()) 23Assert.Equal(ConstantValueTypeDiscriminator.Double, SpecialType.System_Double.ToConstantValueDiscriminator()) 24Assert.Equal(ConstantValueTypeDiscriminator.Decimal, SpecialType.System_Decimal.ToConstantValueDiscriminator()) 25Assert.Equal(ConstantValueTypeDiscriminator.DateTime, SpecialType.System_DateTime.ToConstantValueDiscriminator()) 26Assert.Equal(ConstantValueTypeDiscriminator.String, SpecialType.System_String.ToConstantValueDiscriminator())
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (1)
MetadataHelpers.vb (1)
11Friend Function GetCorLibType(this As ModuleSymbol, typeId As SpecialType) As NamedTypeSymbol
Microsoft.CodeAnalysis.VisualBasic.Workspaces (203)
CodeCleanup\AsyncOrIteratorFunctionReturnTypeFixer.vb (5)
133Case SpecialType.System_Collections_IEnumerable, SpecialType.System_Collections_IEnumerator, 134SpecialType.System_Collections_Generic_IEnumerable_T, SpecialType.System_Collections_Generic_IEnumerator_T 137Dim iEnumerableOfT = semanticModel.Compilation.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T)
CodeGeneration\VisualBasicSyntaxGenerator.vb (17)
342Public Overrides Function TypeExpression(specialType As SpecialType) As SyntaxNode 344Case SpecialType.System_Boolean 346Case SpecialType.System_Byte 348Case SpecialType.System_Char 350Case SpecialType.System_Decimal 352Case SpecialType.System_Double 354Case SpecialType.System_Int16 356Case SpecialType.System_Int32 358Case SpecialType.System_Int64 360Case SpecialType.System_Object 362Case SpecialType.System_SByte 364Case SpecialType.System_Single 366Case SpecialType.System_String 368Case SpecialType.System_UInt16 370Case SpecialType.System_UInt32 372Case SpecialType.System_UInt64 374Case SpecialType.System_DateTime
Recommendations\VisualBasicRecommendationServiceRunner.vb (1)
158Return typeSymbol.SpecialType <> SpecialType.System_Delegate
Rename\VisualBasicRenameRewriterLanguageService.vb (1)
954If Not method.ReturnsVoid AndAlso Not method.Parameters.Any() AndAlso method.ReturnType.SpecialType = SpecialType.System_Boolean Then
Simplification\Simplifiers\AbstractVisualBasicSimplifier.vb (17)
20Protected Shared Function GetPredefinedKeywordKind(type As SpecialType) As SyntaxKind 22Case SpecialType.System_Boolean 24Case SpecialType.System_Byte 26Case SpecialType.System_SByte 28Case SpecialType.System_Int32 30Case SpecialType.System_UInt32 32Case SpecialType.System_Int16 34Case SpecialType.System_UInt16 36Case SpecialType.System_Int64 38Case SpecialType.System_UInt64 40Case SpecialType.System_Single 42Case SpecialType.System_Double 44Case SpecialType.System_Decimal 46Case SpecialType.System_String 48Case SpecialType.System_Char 50Case SpecialType.System_Object 52Case SpecialType.System_DateTime
Simplification\Simplifiers\ExpressionSimplifier.vb (1)
246If isInCref AndAlso TypeOf rightSymbol Is IMethodSymbol AndAlso Not containingType.SpecialType = SpecialType.None Then
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\ExpressionSyntaxExtensions.vb (1)
111If typeInfo.Type IsNot Nothing AndAlso typeInfo.Type.SpecialType = SpecialType.System_Void Then
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Utilities\CastAnalyzer.vb (15)
225If If(castType?.SpecialType = SpecialType.System_Object, False) AndAlso 319DirectCast(castExpressionType.OriginalDefinition, ITypeSymbol).SpecialType = SpecialType.System_Nullable_T 381Case SpecialType.System_Single, SpecialType.System_Double 383Case SpecialType.System_UInt32, SpecialType.System_Int32, 384SpecialType.System_UInt64, SpecialType.System_Int64, 385SpecialType.System_Decimal 397ElseIf castType.SpecialType = SpecialType.System_DateTime Then 398Return Not outerType.SpecialType = SpecialType.System_DateTime 399ElseIf castType.SpecialType = SpecialType.System_Boolean Then 400Return Not (outerType.IsNumericType OrElse outerType.SpecialType = SpecialType.System_Boolean) 403If castType.OriginalDefinition?.SpecialType = SpecialType.System_Nullable_T Then 415If castType.Equals(outerType) OrElse outerType.SpecialType = SpecialType.System_Object Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\ExpressionGenerator.vb (28)
71Return GenerateIntegralLiteralExpression(type, SpecialType.System_SByte, DirectCast(value, SByte), canUseFieldReference, LiteralSpecialValues.SByteSpecialValues, Function(x) x < 0, Function(x) -x, "128") 73Return GenerateIntegralLiteralExpression(type, SpecialType.System_Int16, DirectCast(value, Short), canUseFieldReference, LiteralSpecialValues.Int16SpecialValues, Function(x) x < 0, Function(x) -x, "32768") 75Return GenerateIntegralLiteralExpression(type, SpecialType.System_Int32, DirectCast(value, Integer), canUseFieldReference, LiteralSpecialValues.Int32SpecialValues, Function(x) x < 0, Function(x) -x, "2147483648") 77Return GenerateIntegralLiteralExpression(type, SpecialType.System_Int64, DirectCast(value, Long), canUseFieldReference, LiteralSpecialValues.Int64SpecialValues, Function(x) x < 0, Function(x) -x, "9223372036854775808") 79Return GenerateNonNegativeIntegralLiteralExpression(type, SpecialType.System_Byte, DirectCast(value, Byte), canUseFieldReference, LiteralSpecialValues.ByteSpecialValues) 81Return GenerateNonNegativeIntegralLiteralExpression(type, SpecialType.System_UInt16, DirectCast(value, UShort), canUseFieldReference, LiteralSpecialValues.UInt16SpecialValues) 83Return GenerateNonNegativeIntegralLiteralExpression(type, SpecialType.System_UInt32, DirectCast(value, UInteger), canUseFieldReference, LiteralSpecialValues.UInt32SpecialValues) 85Return GenerateNonNegativeIntegralLiteralExpression(type, SpecialType.System_UInt64, DirectCast(value, ULong), canUseFieldReference, LiteralSpecialValues.UInt64SpecialValues) 116If Not IsSpecialType(type, SpecialType.System_String) Then 163specialType As SpecialType, 179specialType As SpecialType, 216If TypeOf value Is Byte AndAlso Not IsSpecialType(type, SpecialType.System_Byte) Then 218ElseIf TypeOf value Is SByte AndAlso Not IsSpecialType(type, SpecialType.System_SByte) Then 229If TypeOf value Is Short AndAlso Not IsSpecialType(type, SpecialType.System_Int16) Then 232ElseIf TypeOf value Is Long AndAlso Not IsSpecialType(type, SpecialType.System_Int64) Then 239Dim typeIsNotDecimal = Not IsSpecialType(type, SpecialType.System_Decimal) 249ElseIf TypeOf value Is UShort AndAlso Not IsSpecialType(type, SpecialType.System_UInt16) Then 252ElseIf TypeOf value Is UInteger AndAlso Not IsSpecialType(type, SpecialType.System_UInt32) Then 258Dim typeIsNotULong = Not IsSpecialType(type, SpecialType.System_UInt64) 266ElseIf TypeOf value Is Single AndAlso Not IsSpecialType(type, SpecialType.System_Single) Then 269ElseIf TypeOf value Is Double AndAlso Not IsSpecialType(type, SpecialType.System_Double) Then 295type, SpecialType.System_Double, value, canUseFieldReference, 320type, SpecialType.System_Single, value, canUseFieldReference, 326specialType As SpecialType, 375Dim field = GenerateFieldReference(SpecialType.System_Decimal, value, LiteralSpecialValues.DecimalSpecialValues) 389Private Function AddSpecialTypeAnnotation(type As SpecialType, expression As MemberAccessExpressionSyntax) As MemberAccessExpressionSyntax 390If SpecialType.None <> type Then 397Private Function GenerateFieldReference(Of TStructure)(type As SpecialType,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\MethodGenerator.vb (1)
70Dim isSub = method.ReturnType.SpecialType = SpecialType.System_Void
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\NamedTypeGenerator.vb (2)
149If(namedType.EnumUnderlyingType IsNot Nothing AndAlso namedType.EnumUnderlyingType.SpecialType <> SpecialType.System_Int32, 207namedType.BaseType.SpecialType = SpecialType.System_Object Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\ParameterGenerator.vb (1)
47elementType.OriginalDefinition.SpecialType <> SpecialType.System_Nullable_T Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\VisualBasicFlagsEnumGenerator.vb (1)
25underlyingSpecialType As SpecialType,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ITypeSymbolExtensions.vb (49)
19Public Function GetPredefinedCastKeyword(specialType As SpecialType) As SyntaxKind 21Case specialType.System_Boolean 23Case specialType.System_Byte 25Case specialType.System_Char 27Case specialType.System_DateTime 29Case specialType.System_Decimal 31Case specialType.System_Double 33Case specialType.System_Int32 35Case specialType.System_Int64 37Case specialType.System_Object 39Case specialType.System_SByte 41Case specialType.System_Single 43Case specialType.System_Int16 45Case SpecialType.System_String 47Case specialType.System_UInt32 49Case specialType.System_UInt64 51Case specialType.System_UInt16 60Dim specialType As SpecialType 63specialType = specialType.System_Boolean 65specialType = specialType.System_Byte 67specialType = specialType.System_Char 69specialType = specialType.System_DateTime 71specialType = specialType.System_Decimal 73specialType = specialType.System_Double 75specialType = specialType.System_Int32 77specialType = specialType.System_Int64 79specialType = specialType.System_Object 81specialType = specialType.System_SByte 83specialType = specialType.System_Single 85specialType = specialType.System_String 87specialType = specialType.System_Int16 89specialType = specialType.System_UInt32 91specialType = specialType.System_UInt64 93specialType = specialType.System_UInt16 104Case SpecialType.System_Boolean, 105SpecialType.System_Byte, 106SpecialType.System_SByte, 107SpecialType.System_Int16, 108SpecialType.System_UInt16, 109SpecialType.System_Int32, 110SpecialType.System_UInt32, 111SpecialType.System_Int64, 112SpecialType.System_UInt64, 113SpecialType.System_Single, 114SpecialType.System_Double, 115SpecialType.System_Decimal, 116SpecialType.System_DateTime, 117SpecialType.System_Char, 118SpecialType.System_String
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\StringExtensions.vb (16)
97Case SpecialType.System_Boolean, 98SpecialType.System_Byte, 99SpecialType.System_SByte, 100SpecialType.System_Int16, 101SpecialType.System_UInt16, 102SpecialType.System_Int32, 103SpecialType.System_UInt32, 104SpecialType.System_Int64, 105SpecialType.System_UInt64, 106SpecialType.System_Single, 107SpecialType.System_Double, 108SpecialType.System_Decimal, 109SpecialType.System_DateTime, 110SpecialType.System_Char, 111SpecialType.System_String, 112SpecialType.System_Object
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\TypeSyntaxGeneratorVisitor.vb (17)
81If symbol.OriginalDefinition.SpecialType = SpecialType.System_Nullable_T Then 96Case SpecialType.System_Object 98Case SpecialType.System_Boolean 100Case SpecialType.System_Char 102Case SpecialType.System_SByte 104Case SpecialType.System_Byte 106Case SpecialType.System_Int16 108Case SpecialType.System_UInt16 110Case SpecialType.System_Int32 112Case SpecialType.System_Int64 114Case SpecialType.System_UInt32 116Case SpecialType.System_UInt64 118Case SpecialType.System_Decimal 120Case SpecialType.System_Single 122Case SpecialType.System_Double 124Case SpecialType.System_String 126Case SpecialType.System_DateTime
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicTypeInferenceService.TypeInferrer.vb (30)
235Return CreateResult(Compilation.GetSpecialType(SpecialType.System_Int32)) 282Return CreateResult(Compilation.GetSpecialType(SpecialType.System_Int32)) 412Return CreateResult(Me.Compilation.GetSpecialType(SpecialType.System_Int32)) 452Return CreateResult(Me.Compilation.GetSpecialType(SpecialType.System_Int32)) 486Return types.Select(Function(t) New TypeInferenceInfo(If(t.InferredType.SpecialType = SpecialType.System_Void, task, taskOfT.Construct(t.InferredType)))) 505New TypeInferenceInfo(Me.Compilation.GetSpecialType(SpecialType.System_Nullable_T).Construct(t.InferredType)), 511If t.InferredType.OriginalDefinition.SpecialType = SpecialType.System_Nullable_T Then 534Return CreateResult(Me.Compilation.GetSpecialType(SpecialType.System_Int32)) 544If otherSideTypes.Any(Function(t) t.InferredType.SpecialType <> SpecialType.System_Object AndAlso Not t.InferredType.IsErrorType()) Then 568Return CreateResult(Me.Compilation.GetSpecialType(SpecialType.System_Int32)) 574Return CreateResult(SpecialType.System_Boolean) 594Return CreateResult(SpecialType.System_Boolean) 598Return CreateResult(SpecialType.System_Boolean) 605Return CreateResult(SpecialType.System_IDisposable) 648Return CreateResult(SpecialType.System_Void) 660Dim type = Me.Compilation.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T) 664Dim type = Me.Compilation.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T) 665Return CreateResult(type.Construct(Compilation.GetSpecialType(SpecialType.System_Object))) 694Return CreateResult(Me.Compilation.GetSpecialType(SpecialType.System_Int32)) 698Return CreateResult(SpecialType.System_Boolean) 773If memberType.OriginalDefinition.SpecialType = SpecialType.System_Collections_Generic_IEnumerable_T OrElse 774memberType.OriginalDefinition.SpecialType = SpecialType.System_Collections_Generic_IEnumerator_T Then 806Return CreateResult(Me.Compilation.GetSpecialType(SpecialType.System_Int32)) 815Return CreateResult(SpecialType.System_Boolean) 823Return CreateResult(SpecialType.System_Boolean) 841Return CreateResult(Me.Compilation.GetSpecialType(SpecialType.System_Int32)) 848Return CreateResult(SpecialType.System_Boolean) 857Return CreateResult(SpecialType.System_IDisposable) 869Return CreateResult(SpecialType.System_Boolean) 873Return CreateResult(SpecialType.System_Boolean)
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (31)
CodeGeneration\SyntaxGeneratorTests.vb (31)
24Me._ienumerableInt = _emptyCompilation.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T).Construct(_emptyCompilation.GetSpecialType(SpecialType.System_Int32)) 254Dim intType = _emptyCompilation.GetSpecialType(SpecialType.System_Int32) 266VerifySyntax(Of TypeSyntax)(Generator.TypeExpression(SpecialType.System_Byte), "Byte") 267VerifySyntax(Of TypeSyntax)(Generator.TypeExpression(SpecialType.System_SByte), "SByte") 269VerifySyntax(Of TypeSyntax)(Generator.TypeExpression(SpecialType.System_Int16), "Short") 270VerifySyntax(Of TypeSyntax)(Generator.TypeExpression(SpecialType.System_UInt16), "UShort") 272VerifySyntax(Of TypeSyntax)(Generator.TypeExpression(SpecialType.System_Int32), "Integer") 273VerifySyntax(Of TypeSyntax)(Generator.TypeExpression(SpecialType.System_UInt32), "UInteger") 275VerifySyntax(Of TypeSyntax)(Generator.TypeExpression(SpecialType.System_Int64), "Long") 276VerifySyntax(Of TypeSyntax)(Generator.TypeExpression(SpecialType.System_UInt64), "ULong") 278VerifySyntax(Of TypeSyntax)(Generator.TypeExpression(SpecialType.System_Single), "Single") 279VerifySyntax(Of TypeSyntax)(Generator.TypeExpression(SpecialType.System_Double), "Double") 281VerifySyntax(Of TypeSyntax)(Generator.TypeExpression(SpecialType.System_Char), "Char") 282VerifySyntax(Of TypeSyntax)(Generator.TypeExpression(SpecialType.System_String), "String") 284VerifySyntax(Of TypeSyntax)(Generator.TypeExpression(SpecialType.System_Object), "Object") 285VerifySyntax(Of TypeSyntax)(Generator.TypeExpression(SpecialType.System_Decimal), "Decimal") 290Dim genericType = _emptyCompilation.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T) 293Dim arrayType = _emptyCompilation.CreateArrayTypeSymbol(_emptyCompilation.GetSpecialType(SpecialType.System_Int32)) 368Dim intType = _emptyCompilation.GetSpecialType(SpecialType.System_Int32) 828Generator.FieldDeclaration("fld", Generator.TypeExpression(SpecialType.System_Int32)), 832Generator.FieldDeclaration("fld", Generator.TypeExpression(SpecialType.System_Int32), initializer:=Generator.LiteralExpression(0)), 836Generator.FieldDeclaration("fld", Generator.TypeExpression(SpecialType.System_Int32), accessibility:=Accessibility.Public), 840Generator.FieldDeclaration("fld", Generator.TypeExpression(SpecialType.System_Int32), modifiers:=DeclarationModifiers.Static Or DeclarationModifiers.ReadOnly Or DeclarationModifiers.WithEvents), 938_emptyCompilation.GetSpecialType(SpecialType.System_Int32), 939_emptyCompilation.GetSpecialType(SpecialType.System_String) 943Dim returnType = Generator.TypeExpression(SpecialType.System_Boolean) 1074Dim doubleType = _emptyCompilation.GetSpecialType(SpecialType.System_Decimal) 1076Function(m) m.Name = WellKnownMemberNames.ImplicitConversionName AndAlso m.Parameters(0).Type.Equals(_emptyCompilation.GetSpecialType(SpecialType.System_Byte))) 1353Dim params = {Generator.ParameterDeclaration("sender", Generator.TypeExpression(SpecialType.System_Object)), Generator.ParameterDeclaration("args", Generator.IdentifierName("EventArgs"))} 2472Dim field = _emptyCompilation.GetSpecialType(SpecialType.System_UInt32).GetMembers(NameOf(UInt32.MaxValue)).Single()
Microsoft.CodeAnalysis.Workspaces (400)
Editing\SyntaxGenerator.cs (2)
785underlyingType: type.EnumUnderlyingType is null or { SpecialType: SpecialType.System_Int32 } 1954public abstract SyntaxNode TypeExpression(SpecialType specialType);
FindSymbols\FindReferences\DependentProjectsFinder.cs (1)
291typeNameConstant.Type.SpecialType != SpecialType.System_String ||
FindSymbols\FindReferences\DependentTypeFinder.cs (5)
216case SpecialType.System_Object: 220predicate: static n => n.BaseType?.SpecialType == SpecialType.System_Object).ConfigureAwait(false); 222case SpecialType.System_ValueType: 226case SpecialType.System_Enum: 230case SpecialType.System_MulticastDelegate:
ObsoleteSymbol\AbstractObsoleteSymbolService.cs (1)
200if (symbol is INamedTypeSymbol { OriginalDefinition.SpecialType: SpecialType.System_Nullable_T, TypeArguments: [var valueType] })
Recommendations\AbstractRecommendationService.cs (1)
75if (namedType.SpecialType == SpecialType.System_Void)
Recommendations\AbstractRecommendationServiceRunner.cs (9)
305AddSpecialTypeSymbolAndItsAliases(nameof(Byte), SpecialType.System_Byte); 306AddSpecialTypeSymbolAndItsAliases(nameof(SByte), SpecialType.System_SByte); 307AddSpecialTypeSymbolAndItsAliases(nameof(Int16), SpecialType.System_Int16); 308AddSpecialTypeSymbolAndItsAliases(nameof(UInt16), SpecialType.System_UInt16); 309AddSpecialTypeSymbolAndItsAliases(nameof(Int32), SpecialType.System_Int32); 310AddSpecialTypeSymbolAndItsAliases(nameof(UInt32), SpecialType.System_UInt32); 311AddSpecialTypeSymbolAndItsAliases(nameof(Int64), SpecialType.System_Int64); 312AddSpecialTypeSymbolAndItsAliases(nameof(UInt64), SpecialType.System_UInt64); 316void AddSpecialTypeSymbolAndItsAliases(string name, SpecialType specialType)
Shared\Extensions\ITypeSymbolExtensions.cs (4)
178if (type.OriginalDefinition is { SpecialType: SpecialType.System_Collections_Generic_IEnumerable_T or SpecialType.System_Collections_IEnumerable }) 183return type.AllInterfaces.Any(s => s.SpecialType is SpecialType.System_Collections_Generic_IEnumerable_T or SpecialType.System_Collections_IEnumerable);
Shared\Utilities\EditorBrowsableHelpers.cs (1)
100var shortType = compilation.GetSpecialType(SpecialType.System_Int16);
src\Compilers\Core\Portable\SpecialTypeExtensions.cs (154)
17public static bool IsClrInteger(this SpecialType specialType) 21case SpecialType.System_Boolean: 22case SpecialType.System_Char: 23case SpecialType.System_Byte: 24case SpecialType.System_SByte: 25case SpecialType.System_Int16: 26case SpecialType.System_UInt16: 27case SpecialType.System_Int32: 28case SpecialType.System_UInt32: 29case SpecialType.System_Int64: 30case SpecialType.System_UInt64: 31case SpecialType.System_IntPtr: 32case SpecialType.System_UIntPtr: 42public static bool IsBlittable(this SpecialType specialType) 46case SpecialType.System_Boolean: 47case SpecialType.System_Char: 48case SpecialType.System_Byte: 49case SpecialType.System_SByte: 50case SpecialType.System_Int16: 51case SpecialType.System_UInt16: 52case SpecialType.System_Int32: 53case SpecialType.System_UInt32: 54case SpecialType.System_Int64: 55case SpecialType.System_UInt64: 56case SpecialType.System_Single: 57case SpecialType.System_Double: 64public static bool IsValueType(this SpecialType specialType) 68case SpecialType.System_Void: 69case SpecialType.System_Boolean: 70case SpecialType.System_Char: 71case SpecialType.System_Byte: 72case SpecialType.System_SByte: 73case SpecialType.System_Int16: 74case SpecialType.System_UInt16: 75case SpecialType.System_Int32: 76case SpecialType.System_UInt32: 77case SpecialType.System_Int64: 78case SpecialType.System_UInt64: 79case SpecialType.System_Single: 80case SpecialType.System_Double: 81case SpecialType.System_Decimal: 82case SpecialType.System_IntPtr: 83case SpecialType.System_UIntPtr: 84case SpecialType.System_Nullable_T: 85case SpecialType.System_DateTime: 86case SpecialType.System_TypedReference: 87case SpecialType.System_ArgIterator: 88case SpecialType.System_RuntimeArgumentHandle: 89case SpecialType.System_RuntimeFieldHandle: 90case SpecialType.System_RuntimeMethodHandle: 91case SpecialType.System_RuntimeTypeHandle: 98public static int SizeInBytes(this SpecialType specialType) 102case SpecialType.System_SByte: 104case SpecialType.System_Byte: 106case SpecialType.System_Int16: 108case SpecialType.System_UInt16: 110case SpecialType.System_Int32: 112case SpecialType.System_UInt32: 114case SpecialType.System_Int64: 116case SpecialType.System_UInt64: 118case SpecialType.System_Char: 120case SpecialType.System_Single: 122case SpecialType.System_Double: 124case SpecialType.System_Boolean: 127case SpecialType.System_Decimal: 141public static bool IsPrimitiveRecursiveStruct(this SpecialType specialType) 145case SpecialType.System_Boolean: 146case SpecialType.System_Byte: 147case SpecialType.System_Char: 148case SpecialType.System_Double: 149case SpecialType.System_Int16: 150case SpecialType.System_Int32: 151case SpecialType.System_Int64: 152case SpecialType.System_UInt16: 153case SpecialType.System_UInt32: 154case SpecialType.System_UInt64: 155case SpecialType.System_IntPtr: 156case SpecialType.System_UIntPtr: 157case SpecialType.System_SByte: 158case SpecialType.System_Single: 165public static bool IsValidEnumUnderlyingType(this SpecialType specialType) 169case SpecialType.System_Byte: 170case SpecialType.System_SByte: 171case SpecialType.System_Int16: 172case SpecialType.System_UInt16: 173case SpecialType.System_Int32: 174case SpecialType.System_UInt32: 175case SpecialType.System_Int64: 176case SpecialType.System_UInt64: 183public static bool IsNumericType(this SpecialType specialType) 187case SpecialType.System_Byte: 188case SpecialType.System_SByte: 189case SpecialType.System_Int16: 190case SpecialType.System_UInt16: 191case SpecialType.System_Int32: 192case SpecialType.System_UInt32: 193case SpecialType.System_Int64: 194case SpecialType.System_UInt64: 195case SpecialType.System_Single: 196case SpecialType.System_Double: 197case SpecialType.System_Decimal: 207public static bool IsIntegralType(this SpecialType specialType) 211case SpecialType.System_Byte: 212case SpecialType.System_SByte: 213case SpecialType.System_Int16: 214case SpecialType.System_UInt16: 215case SpecialType.System_Int32: 216case SpecialType.System_UInt32: 217case SpecialType.System_Int64: 218case SpecialType.System_UInt64: 225public static bool IsUnsignedIntegralType(this SpecialType specialType) 229case SpecialType.System_Byte: 230case SpecialType.System_UInt16: 231case SpecialType.System_UInt32: 232case SpecialType.System_UInt64: 239public static bool IsSignedIntegralType(this SpecialType specialType) 243case SpecialType.System_SByte: 244case SpecialType.System_Int16: 245case SpecialType.System_Int32: 246case SpecialType.System_Int64: 258public static int VBForToShiftBits(this SpecialType specialType) 262case SpecialType.System_SByte: 264case SpecialType.System_Int16: 266case SpecialType.System_Int32: 268case SpecialType.System_Int64: 275public static SpecialType FromRuntimeTypeOfLiteralValue(object value) 282return SpecialType.System_Int32; 287return SpecialType.System_String; 292return SpecialType.System_Boolean; 297return SpecialType.System_Char; 302return SpecialType.System_Int64; 307return SpecialType.System_Double; 312return SpecialType.System_UInt32; 317return SpecialType.System_UInt64; 322return SpecialType.System_Single; 327return SpecialType.System_Decimal; 332return SpecialType.System_Int16; 337return SpecialType.System_UInt16; 342return SpecialType.System_DateTime; 347return SpecialType.System_Byte; 352return SpecialType.System_SByte; 355return SpecialType.None; 365public static bool CanOptimizeBehavior(this SpecialType specialType) 366=> specialType is >= SpecialType.System_Object and <= SpecialType.System_Runtime_CompilerServices_InlineArrayAttribute; 371internal static ulong ConvertUnderlyingValueToUInt64(this SpecialType enumUnderlyingType, object value) 379SpecialType.System_SByte => (ulong)(sbyte)value, 380SpecialType.System_Int16 => (ulong)(short)value, 381SpecialType.System_Int32 => (ulong)(int)value, 382SpecialType.System_Int64 => (ulong)(long)value, 383SpecialType.System_Byte => (byte)value, 384SpecialType.System_UInt16 => (ushort)value, 385SpecialType.System_UInt32 => (uint)value, 386SpecialType.System_UInt64 => (ulong)value,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (2)
157type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T || 174if (type.SpecialType == SpecialType.System_String)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SemanticFacts\ISemanticFactsExtensions.cs (2)
119=> type?.SpecialType is SpecialType.System_Single or SpecialType.System_Double;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Simplification\SpecialTypeAnnotation.cs (8)
14private static readonly ConcurrentDictionary<SpecialType, string> s_fromSpecialTypes = new(); 15private static readonly ConcurrentDictionary<string, SpecialType> s_toSpecialTypes = new(); 17public static SyntaxAnnotation Create(SpecialType specialType) 20public static SpecialType GetSpecialType(SyntaxAnnotation annotation) 23private static string CreateFromSpecialTypes(SpecialType arg) 26private static SpecialType CreateToSpecialTypes(string arg) 27=> (SpecialType)Enum.Parse(typeof(SpecialType), arg);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.NamedTypeSymbolKey.cs (1)
26visitor.WriteBoolean(symbol.SpecialType == SpecialType.System_IntPtr);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (6)
758&& symbol.ContainingType.SpecialType == SpecialType.System_Object 1017if (newReceiverType.SpecialType != SpecialType.None) 1024return newSymbolContainingType.SpecialType is SpecialType.System_Array or 1025SpecialType.System_Delegate or 1026SpecialType.System_Enum or 1027SpecialType.System_String;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (9)
58private static object CreateOne(SpecialType specialType) 61SpecialType.System_SByte => (sbyte)1, 62SpecialType.System_Byte => (byte)1, 63SpecialType.System_Int16 => (short)1, 64SpecialType.System_UInt16 => (ushort)1, 65SpecialType.System_Int32 => 1, 66SpecialType.System_UInt32 => (uint)1, 67SpecialType.System_Int64 => (long)1, 68SpecialType.System_UInt64 => (ulong)1,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IntegerUtilities.cs (7)
60public static long Convert(long v, SpecialType type) 63SpecialType.System_SByte => unchecked((sbyte)v), 64SpecialType.System_Byte => unchecked((byte)v), 65SpecialType.System_Int16 => unchecked((short)v), 66SpecialType.System_UInt16 => unchecked((ushort)v), 67SpecialType.System_Int32 => unchecked((int)v), 68SpecialType.System_UInt32 => unchecked((uint)v),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\IMethodSymbolExtensions.cs (2)
46method.Parameters is [{ Type.SpecialType: SpecialType.System_Object }, var secondParam] && 107methodSymbol.ReturnType.SpecialType == SpecialType.System_Int32 ||
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (1)
664ContainingType.SpecialType: SpecialType.System_Object,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (4)
512.Select(p => (p.Type ?? compilation.GetSpecialType(SpecialType.System_Object)).WithNullableAnnotation(p.NullableAnnotation)); 517types = types.Concat((method.ReturnType ?? compilation.GetSpecialType(SpecialType.System_Object)).WithNullableAnnotation(method.ReturnNullableAnnotation)); 680if (!returnType.GetMembers().OfType<IPropertySymbol>().Any(p => p.Name == WellKnownMemberNames.IsCompleted && p.Type.SpecialType == SpecialType.System_Boolean && p.GetMethod != null)) 730ReturnType.SpecialType: SpecialType.System_Boolean,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (56)
55=> symbol?.SpecialType == SpecialType.System_Void; 58=> symbol?.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T; 268case SpecialType.System_Array or SpecialType.System_ValueType: 271case SpecialType.System_Delegate: 272case SpecialType.System_MulticastDelegate: 273case SpecialType.System_Enum: 286case SpecialType.System_Byte: 287case SpecialType.System_SByte: 288case SpecialType.System_Int16: 289case SpecialType.System_UInt16: 290case SpecialType.System_Int32: 291case SpecialType.System_UInt32: 292case SpecialType.System_Int64: 293case SpecialType.System_UInt64: 294case SpecialType.System_Single: 295case SpecialType.System_Double: 296case SpecialType.System_Decimal: 297case SpecialType.System_IntPtr when type.IsNativeIntegerType: 298case SpecialType.System_UIntPtr when type.IsNativeIntegerType: 374case SpecialType.System_Object: 375case SpecialType.System_Void: 376case SpecialType.System_Boolean: 377case SpecialType.System_SByte: 378case SpecialType.System_Byte: 379case SpecialType.System_Decimal: 380case SpecialType.System_Single: 381case SpecialType.System_Double: 382case SpecialType.System_Int16: 383case SpecialType.System_Int32: 384case SpecialType.System_Int64: 385case SpecialType.System_Char: 386case SpecialType.System_String: 387case SpecialType.System_UInt16: 388case SpecialType.System_UInt32: 389case SpecialType.System_UInt64: 390case SpecialType.System_IntPtr when symbol.IsNativeIntegerType: 391case SpecialType.System_UIntPtr when symbol.IsNativeIntegerType: 402typeSymbol.AllInterfaces.Any(static i => i.SpecialType == SpecialType.System_Collections_IEnumerable) && 651case SpecialType.System_Boolean: 652case SpecialType.System_Char: 653case SpecialType.System_SByte: 654case SpecialType.System_Byte: 655case SpecialType.System_Int16: 656case SpecialType.System_UInt16: 657case SpecialType.System_Int32: 658case SpecialType.System_UInt32: 659case SpecialType.System_Int64: 660case SpecialType.System_UInt64: 661case SpecialType.System_Decimal: 662case SpecialType.System_Single: 663case SpecialType.System_Double: 666case SpecialType.System_IntPtr: 667case SpecialType.System_UIntPtr: 670case SpecialType.System_DateTime: 759namedType.OriginalDefinition.GetAttributes().Any(static a => a.AttributeClass?.SpecialType == SpecialType.System_Runtime_CompilerServices_InlineArrayAttribute);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\PredefinedTypeExtensions.cs (41)
13public static SpecialType ToSpecialType(this PredefinedType predefinedType) 16PredefinedType.Object => SpecialType.System_Object, 17PredefinedType.Void => SpecialType.System_Void, 18PredefinedType.Boolean => SpecialType.System_Boolean, 19PredefinedType.Char => SpecialType.System_Char, 20PredefinedType.SByte => SpecialType.System_SByte, 21PredefinedType.Byte => SpecialType.System_Byte, 22PredefinedType.Int16 => SpecialType.System_Int16, 23PredefinedType.UInt16 => SpecialType.System_UInt16, 24PredefinedType.Int32 => SpecialType.System_Int32, 25PredefinedType.UInt32 => SpecialType.System_UInt32, 26PredefinedType.Int64 => SpecialType.System_Int64, 27PredefinedType.UInt64 => SpecialType.System_UInt64, 28PredefinedType.Decimal => SpecialType.System_Decimal, 29PredefinedType.Single => SpecialType.System_Single, 30PredefinedType.Double => SpecialType.System_Double, 31PredefinedType.String => SpecialType.System_String, 32PredefinedType.DateTime => SpecialType.System_DateTime, 33PredefinedType.IntPtr => SpecialType.System_IntPtr, 34PredefinedType.UIntPtr => SpecialType.System_UIntPtr, 35_ => SpecialType.None, 38public static PredefinedType ToPredefinedType(this SpecialType specialType) 41SpecialType.System_Object => PredefinedType.Object, 42SpecialType.System_Void => PredefinedType.Void, 43SpecialType.System_Boolean => PredefinedType.Boolean, 44SpecialType.System_Char => PredefinedType.Char, 45SpecialType.System_SByte => PredefinedType.SByte, 46SpecialType.System_Byte => PredefinedType.Byte, 47SpecialType.System_Int16 => PredefinedType.Int16, 48SpecialType.System_UInt16 => PredefinedType.UInt16, 49SpecialType.System_Int32 => PredefinedType.Int32, 50SpecialType.System_UInt32 => PredefinedType.UInt32, 51SpecialType.System_Int64 => PredefinedType.Int64, 52SpecialType.System_UInt64 => PredefinedType.UInt64, 53SpecialType.System_Decimal => PredefinedType.Decimal, 54SpecialType.System_Single => PredefinedType.Single, 55SpecialType.System_Double => PredefinedType.Double, 56SpecialType.System_String => PredefinedType.String, 57SpecialType.System_DateTime => PredefinedType.DateTime, 58SpecialType.System_IntPtr => PredefinedType.IntPtr, 59SpecialType.System_UIntPtr => PredefinedType.UIntPtr,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.cs (1)
198=> symbol.IsKind(SymbolKind.NamedType, out ITypeSymbol? typeSymbol) && typeSymbol.SpecialType == SpecialType.System_Object;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractFlagsEnumGenerator.cs (5)
15protected abstract SyntaxNode CreateExplicitlyCastedLiteralValue(INamedTypeSymbol enumType, SpecialType underlyingSpecialType, object constantValue); 78var underlyingSpecialType = enumType.EnumUnderlyingType.SpecialType; 138IFieldSymbol field, INamedTypeSymbol enumType, SpecialType underlyingSpecialType) 172var underlyingSpecialType = enumType.EnumUnderlyingType.SpecialType; 188var underlyingSpecialType = enumType.EnumUnderlyingType.SpecialType;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (12)
83public static bool IsSpecialType([NotNullWhen(true)] ITypeSymbol? type, SpecialType specialType) 136SpecialType.System_SByte => value is sbyte, 137SpecialType.System_Byte => value is byte, 138SpecialType.System_Int16 => value is short, 139SpecialType.System_UInt16 => value is ushort, 140SpecialType.System_Int32 => value is int, 141SpecialType.System_UInt32 => value is uint, 142SpecialType.System_Int64 => value is long, 143SpecialType.System_UInt64 => value is ulong, 144SpecialType.System_Decimal => value is decimal, 145SpecialType.System_Single => value is float, 146SpecialType.System_Double => value is double,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationSymbolFactory.cs (5)
422SpecialType specialType = SpecialType.None, 441SpecialType specialType = SpecialType.None, 493specialType: SpecialType.None,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\LiteralSpecialValues.cs (11)
16public static bool HasSpecialValues(SpecialType specialType) 20case SpecialType.System_SByte: 21case SpecialType.System_Int16: 22case SpecialType.System_UInt16: 23case SpecialType.System_Int32: 24case SpecialType.System_UInt32: 25case SpecialType.System_Int64: 26case SpecialType.System_UInt64: 27case SpecialType.System_Single: 28case SpecialType.System_Double: 29case SpecialType.System_Decimal:
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationAbstractNamedTypeSymbol.cs (1)
29SpecialType specialType,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationArrayTypeSymbol.cs (1)
10internal sealed class CodeGenerationArrayTypeSymbol(ITypeSymbol elementType, int rank, NullableAnnotation nullableAnnotation) : CodeGenerationTypeSymbol(null, null, default, Accessibility.NotApplicable, default, string.Empty, SpecialType.None, nullableAnnotation), IArrayTypeSymbol
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationMethodSymbol.cs (1)
75=> this.ReturnType == null || this.ReturnType.SpecialType == SpecialType.System_Void;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationNamedTypeSymbol.cs (1)
34SpecialType specialType,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationPointerTypeSymbol.cs (1)
9internal sealed class CodeGenerationPointerTypeSymbol(ITypeSymbol pointedAtType) : CodeGenerationTypeSymbol(null, null, default, Accessibility.NotApplicable, default, string.Empty, SpecialType.None, NullableAnnotation.None), IPointerTypeSymbol
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationTypeParameterSymbol.cs (1)
24int ordinal) : CodeGenerationTypeSymbol(containingType?.ContainingAssembly, containingType, attributes, Accessibility.NotApplicable, default, name, SpecialType.None, nullableAnnotation), ITypeParameterSymbol
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationTypeSymbol.cs (2)
19SpecialType specialType, 23public SpecialType SpecialType { get; protected set; } = specialType;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (1)
85_ => compilation.GetSpecialType(SpecialType.System_Object),
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (19)
50returnType: compilation.GetSpecialType(SpecialType.System_Boolean), 55parameters: [CodeGenerationSymbolFactory.CreateParameterSymbol(compilation.GetSpecialType(SpecialType.System_Object).WithNullableAnnotation(NullableAnnotation.Annotated), ObjName)], 411case SpecialType.System_Boolean: 412case SpecialType.System_Char: 413case SpecialType.System_SByte: 414case SpecialType.System_Byte: 415case SpecialType.System_Int16: 416case SpecialType.System_UInt16: 417case SpecialType.System_Int32: 418case SpecialType.System_UInt32: 419case SpecialType.System_Int64: 420case SpecialType.System_UInt64: 421case SpecialType.System_Decimal: 422case SpecialType.System_Single: 423case SpecialType.System_Double: 424case SpecialType.System_String: 425case SpecialType.System_DateTime: 443method.ReturnType.SpecialType == SpecialType.System_Boolean && 444method.Parameters[0].Type.SpecialType == SpecialType.System_Object &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateGetHashCodeMethod.cs (4)
136? factory.SimpleLocalDeclarationStatement(generatorInternal, compilation.GetSpecialType(SpecialType.System_Int32), HashCodeName, CreateLiteralExpression(factory, initHash)) 137: factory.LocalDeclarationStatement(compilation.GetSpecialType(SpecialType.System_Int64), HashCodeName, CreateLiteralExpression(factory, initHash))); 166compilation.GetSpecialType(SpecialType.System_Int32), 210method.ReturnType.SpecialType == SpecialType.System_Int32 &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (12)
60SpecialType? patternValueType, 184else if (operation is IIsTypeOperation { TypeOperand.SpecialType: SpecialType.System_Object } && generatorInternal.SupportsPatterns(semanticModel.SyntaxTree.Options)) 305SpecialType? patternValueType) 307if (patternValueType is SpecialType specialType && specialType.IsNumericType()) 447if (containingType?.SpecialType == SpecialType.System_Array || 448containingType?.SpecialType == SpecialType.System_String) 458case SpecialType.System_Byte: 459case SpecialType.System_UInt16: 460case SpecialType.System_UInt32: 461case SpecialType.System_UInt64: 497SpecialType? patternValueType) 504if (patternValueType == SpecialType.System_Boolean)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.AbstractTypeInferrer.cs (2)
78protected IEnumerable<TypeInferenceInfo> CreateResult(SpecialType type, NullableAnnotation nullableAnnotation = NullableAnnotation.None) 120symbol.ContainingType?.SpecialType == SpecialType.System_Enum;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.cs (1)
46? [semanticModel.Compilation.GetSpecialType(SpecialType.System_Boolean)]
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\SimplificationHelpers.cs (2)
77var specialType = SpecialTypeAnnotation.GetSpecialType(annotation2); 78if (specialType != SpecialType.None)
Microsoft.CodeAnalysis.Workspaces.UnitTests (18)
Editing\SyntaxEditorTests.cs (5)
52editor.ReplaceNode(fieldX, editor.Generator.FieldDeclaration("Y", editor.Generator.TypeExpression(SpecialType.System_String), Accessibility.Public)); 103editor.InsertAfter(fieldX, editor.Generator.FieldDeclaration("Y", editor.Generator.TypeExpression(SpecialType.System_String), Accessibility.Public)); 130editor.InsertBefore(fieldX, editor.Generator.FieldDeclaration("Y", editor.Generator.TypeExpression(SpecialType.System_String), Accessibility.Public)); 178editor.InsertAfter(fieldX, editor.Generator.FieldDeclaration("Y", editor.Generator.TypeExpression(SpecialType.System_String), Accessibility.Public)); 179editor.InsertBefore(fieldX, editor.Generator.FieldDeclaration("Z", editor.Generator.TypeExpression(SpecialType.System_Object), Accessibility.Public));
SymbolKeyTests.cs (11)
723var constructed = method.Construct(compilation.GetSpecialType(SpecialType.System_Int32), method.TypeParameters[1]); 741var constructed = type.Construct(compilation.GetSpecialType(SpecialType.System_Int32), type.TypeParameters[1]); 761var constructed = outer.Construct(compilation.GetSpecialType(SpecialType.System_String)); 791var a_string = a.Construct(compilation.GetSpecialType(SpecialType.System_String)); 798var a_string_b_int = a_string_b.Construct(compilation.GetSpecialType(SpecialType.System_Int32)); 803var a_string_b_int_m_datetime = ((IMethodSymbol)a_string_b_int_m).Construct(compilation.GetSpecialType(SpecialType.System_DateTime)); 806var a_b_int = a_b.Construct(compilation.GetSpecialType(SpecialType.System_Int32)); 808var a_b_int_m_datetime = ((IMethodSymbol)a_b_int_m).Construct(compilation.GetSpecialType(SpecialType.System_DateTime)); 813var a_b_m_datetime = ((IMethodSymbol)a_b_m).Construct(compilation.GetSpecialType(SpecialType.System_DateTime)); 1313var symbolKey1 = SymbolKey.Create(compilation1.GetSpecialType(SpecialType.System_Int32)); 1314var symbolKey2 = SymbolKey.Create(compilation2.GetSpecialType(SpecialType.System_Int32));
SyntaxNodeTests.cs (1)
103var cgenField = gen.FieldDeclaration("X", gen.TypeExpression(SpecialType.System_Int32), Accessibility.Private);
UtilityTest\DocumentationCommentIdTests.cs (1)
340var intType = compilation.GetSpecialType(SpecialType.System_Int32);
Microsoft.DotNet.CodeAnalysis (2)
Analyzers\AppContextDefaultsAnalyzer.cs (2)
147if (methodSym.Parameters[0].Type.SpecialType != SpecialType.System_String) 150if (methodSym.Parameters[1].Type.SpecialType != SpecialType.System_Boolean)
Microsoft.Extensions.Logging.Generators (5)
LoggerMessageGenerator.Emitter.cs (1)
35compilation.GetSpecialType(SpecialType.System_String).GetMembers("Create").OfType<IMethodSymbol>()
LoggerMessageGenerator.Parser.cs (4)
67INamedTypeSymbol enumerableSymbol = _compilation.GetSpecialType(SpecialType.System_Collections_IEnumerable); 68INamedTypeSymbol stringSymbol = _compilation.GetSpecialType(SpecialType.System_String); 154if (items[0].Type.SpecialType == SpecialType.System_String) 647while (currentClassType is { SpecialType: not SpecialType.System_Object })
Microsoft.Extensions.Options.SourceGeneration (36)
OptionsSourceGenContext.cs (15)
49SpecialType.System_Boolean => true, 50SpecialType.System_Byte => true, 51SpecialType.System_Char => true, 52SpecialType.System_DateTime => true, 53SpecialType.System_Decimal => true, 54SpecialType.System_Double => true, 55SpecialType.System_Int16 => true, 56SpecialType.System_Int32 => true, 57SpecialType.System_Int64 => true, 58SpecialType.System_SByte => true, 59SpecialType.System_Single => true, 60SpecialType.System_UInt16 => true, 61SpecialType.System_UInt32 => true, 62SpecialType.System_UInt64 => true, 63SpecialType.System_String => true,
Parser.cs (16)
204&& m.Parameters[0].Type.SpecialType == SpecialType.System_String 242if (type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T) 257if (SymbolEqualityComparer.Default.Equals(implementingInterface.OriginalDefinition, _compilation.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T))) 270if (modelType.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T) 279while (baseType is not null && baseType.SpecialType != SpecialType.System_Object 550if (transValidatorTypeName == null && speculate && memberType.SpecialType == SpecialType.None) 563if (enumerationValidatorTypeName == null && speculate && memberType.SpecialType != SpecialType.System_String) 600if (memberType.SpecialType == SpecialType.System_String || ConvertTo(memberType, _symbolHolder.ICollectionSymbol)) 604else if (ParserUtilities.TypeHasProperty(memberType, "Count", SpecialType.System_Int32)) 622if (constructorParameters.Length == 1 && constructorParameters[0].Name == "otherProperty" && constructorParameters[0].Type.SpecialType == SpecialType.System_String) 637if (typeSymbol.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T) 669(SymbolEqualityComparer.Default.Equals(typeSymbol, _symbolHolder.TimeSpanSymbol) || typeSymbol.SpecialType == SpecialType.System_String)) 687if (mt.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T) 811if (type.SpecialType == SpecialType.System_Boolean) 822if (type.SpecialType == SpecialType.System_String) 827if (type.SpecialType == SpecialType.System_Char)
ParserUtilities.cs (5)
71internal static bool TypeHasProperty(ITypeSymbol typeSymbol, string propertyName, SpecialType returnType) 76if (type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T) 89} while (type is not null && type.SpecialType != SpecialType.System_Object); 108=> type.SpecialType == SpecialType.System_Nullable_T || type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T;
Microsoft.Extensions.Validation.ValidationsGenerator (11)
Extensions\ITypeSymbolExtensions.cs (2)
15if (type.SpecialType == SpecialType.System_String) 40if (type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T &&
Parsers\ValidationsGenerator.TypesParser.cs (2)
53if (typeSymbol.SpecialType != SpecialType.None) 73while (current != null && current.SpecialType != SpecialType.System_Object)
src\Shared\RoslynUtils\ParsabilityHelper.cs (5)
40if (typeSymbol.SpecialType == SpecialType.System_String) 98methodSymbol.ReturnType.SpecialType == SpecialType.System_Boolean && 100methodSymbol.Parameters[0].Type.SpecialType == SpecialType.System_String && 108methodSymbol.ReturnType.SpecialType == SpecialType.System_Boolean && 110methodSymbol.Parameters[0].Type.SpecialType == SpecialType.System_String &&
src\Shared\RoslynUtils\SymbolExtensions.cs (1)
34if (unwrapNullable && unwrappedTypeSymbol?.ConstructedFrom.SpecialType == SpecialType.System_Nullable_T)
src\Shared\RoslynUtils\WellKnownTypes.cs (1)
56public INamedTypeSymbol Get(SpecialType type)
Microsoft.Gen.Logging (13)
Parsing\AttributeProcessors.cs (1)
51else if (a.Type?.SpecialType == SpecialType.System_Int32)
Parsing\Parser.cs (1)
645while (currentClassType is { SpecialType: not SpecialType.System_Object })
Parsing\Parser.LogProperties.cs (1)
94while (namedType != null && namedType.SpecialType != SpecialType.System_Object)
Parsing\Parser.Records.cs (1)
36while (namedType != null && namedType.SpecialType != SpecialType.System_Object)
Parsing\SymbolLoader.cs (1)
89var enumerableSymbol = compilation.GetSpecialType(SpecialType.System_Collections_IEnumerable);
Parsing\TypeSymbolExtensions.cs (6)
14&& sym.SpecialType != SpecialType.System_String; 51&& ts.Parameters[0].Type.SpecialType == SpecialType.System_String 71=> typeSymbol.SpecialType != SpecialType.None || 72typeSymbol.OriginalDefinition.SpecialType != SpecialType.None || 80while (current != null && current.SpecialType != SpecialType.System_Object) 95if (sym is INamedTypeSymbol namedTypeSymbol && namedTypeSymbol.IsGenericType && namedTypeSymbol.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T)
src\Generators\Shared\ParserUtilities.cs (2)
78=> type.SpecialType == SpecialType.System_Nullable_T || type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T;
Microsoft.Gen.Logging.Unit.Tests (9)
LogParserUtilitiesTests.cs (5)
24typeSymbolMock.SetupGet(x => x.SpecialType).Returns(SpecialType.System_Nullable_T); 29anotherTypeSymbolMock.SetupGet(x => x.SpecialType).Returns(SpecialType.None); 39typeSymbolMock.SetupGet(x => x.SpecialType).Returns(SpecialType.None); 99.Returns(SpecialType.None); 156paramTypeMock.SetupGet(x => x.SpecialType).Returns(SpecialType.None);
TypeSymbolExtensionsTests.cs (4)
286INamedTypeSymbol nullableType = compilation.GetSpecialType(SpecialType.System_Nullable_T); 287INamedTypeSymbol intType = compilation.GetSpecialType(SpecialType.System_Int32); 298INamedTypeSymbol intType = compilation.GetSpecialType(SpecialType.System_Int32); 308INamedTypeSymbol intType = compilation.GetSpecialType(SpecialType.System_Int32);
Microsoft.Gen.MetadataExtractor (17)
src\Generators\Microsoft.Gen.Metrics\Parser.cs (14)
34private static readonly HashSet<SpecialType> _allowedGenericAttributeTypeArgs = 36SpecialType.System_Byte, 37SpecialType.System_Int16, 38SpecialType.System_Int32, 39SpecialType.System_Int64, 40SpecialType.System_Decimal, 41SpecialType.System_Single, 42SpecialType.System_Double 573if (returnType.SpecialType != SpecialType.None || 686SpecialType specialType; 719if (specialType == SpecialType.None) 758if (specialType == SpecialType.System_String) 787else if (specialType == SpecialType.None) 814if (kind == TypeKind.Struct && specialType == SpecialType.None)
src\Generators\Microsoft.Gen.Metrics\SymbolLoader.cs (1)
36var longType = compilation.GetSpecialType(SpecialType.System_Int64);
src\Generators\Shared\ParserUtilities.cs (2)
78=> type.SpecialType == SpecialType.System_Nullable_T || type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T;
Microsoft.Gen.Metrics (17)
Parser.cs (14)
34private static readonly HashSet<SpecialType> _allowedGenericAttributeTypeArgs = 36SpecialType.System_Byte, 37SpecialType.System_Int16, 38SpecialType.System_Int32, 39SpecialType.System_Int64, 40SpecialType.System_Decimal, 41SpecialType.System_Single, 42SpecialType.System_Double 573if (returnType.SpecialType != SpecialType.None || 686SpecialType specialType; 719if (specialType == SpecialType.None) 758if (specialType == SpecialType.System_String) 787else if (specialType == SpecialType.None) 814if (kind == TypeKind.Struct && specialType == SpecialType.None)
src\Generators\Shared\ParserUtilities.cs (2)
78=> type.SpecialType == SpecialType.System_Nullable_T || type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T;
SymbolLoader.cs (1)
36var longType = compilation.GetSpecialType(SpecialType.System_Int64);
Microsoft.Gen.MetricsReports (17)
src\Generators\Microsoft.Gen.Metrics\Parser.cs (14)
34private static readonly HashSet<SpecialType> _allowedGenericAttributeTypeArgs = 36SpecialType.System_Byte, 37SpecialType.System_Int16, 38SpecialType.System_Int32, 39SpecialType.System_Int64, 40SpecialType.System_Decimal, 41SpecialType.System_Single, 42SpecialType.System_Double 573if (returnType.SpecialType != SpecialType.None || 686SpecialType specialType; 719if (specialType == SpecialType.None) 758if (specialType == SpecialType.System_String) 787else if (specialType == SpecialType.None) 814if (kind == TypeKind.Struct && specialType == SpecialType.None)
src\Generators\Microsoft.Gen.Metrics\SymbolLoader.cs (1)
36var longType = compilation.GetSpecialType(SpecialType.System_Int64);
src\Generators\Shared\ParserUtilities.cs (2)
78=> type.SpecialType == SpecialType.System_Nullable_T || type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T;
Microsoft.Interop.ComInterfaceGenerator (9)
Analyzers\ConvertComImportToGeneratedComInterfaceAnalyzer.cs (3)
215public bool CanProvideMarshallingInfoForType(ITypeSymbol type) => type.SpecialType == SpecialType.System_String; 222public bool CanProvideMarshallingInfoForType(ITypeSymbol type) => type is { TypeKind: TypeKind.Array or TypeKind.Delegate } or { SpecialType: SpecialType.System_Array or SpecialType.System_Object };
Analyzers\RuntimeComApiUsageWithSourceGeneratedComAnalyzer.cs (2)
146if (operand is IConversionOperation { Type.SpecialType: SpecialType.System_Object } objConversion) 174if (operand is IConversionOperation { Type.SpecialType: SpecialType.System_Object } objConversion)
ComInterfaceGenerator.cs (2)
327if ((returnSwappedSignatureElements[i].ManagedType is SpecialTypeInfo { SpecialType: SpecialType.System_Int32 or SpecialType.System_Enum } or EnumTypeInfo
src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (2)
244if (parameter.Type.SpecialType == SpecialType.System_Boolean 253if (methodSymbol.ReturnType.SpecialType == SpecialType.System_Boolean
Microsoft.Interop.JavaScript.JSImportGenerator (15)
JSManagedTypeInfo.cs (15)
19case { SpecialType: SpecialType.System_Void }: 24case { SpecialType: SpecialType.System_Boolean }: 29case { SpecialType: SpecialType.System_Byte }: 34case { SpecialType: SpecialType.System_Char }: 39case { SpecialType: SpecialType.System_Int16 }: 44case { SpecialType: SpecialType.System_Int32 }: 49case { SpecialType: SpecialType.System_Int64 }: 54case { SpecialType: SpecialType.System_Single }: 59case { SpecialType: SpecialType.System_Double }: 64case { SpecialType: SpecialType.System_IntPtr }: 65case IPointerTypeSymbol { PointedAtType.SpecialType: SpecialType.System_Void }: 70case { SpecialType: SpecialType.System_DateTime }: 85case { SpecialType: SpecialType.System_Object }: 90case { SpecialType: SpecialType.System_String }: 102case INamedTypeSymbol { ConstructedFrom.SpecialType: SpecialType.System_Nullable_T } nullable:
Microsoft.Interop.LibraryImportGenerator (19)
Analyzers\ConvertToLibraryImportFixer.cs (5)
251editor.Generator.TypeExpression(editor.SemanticModel.Compilation.GetSpecialType(SpecialType.System_Int32))); 683if (param.Type.SpecialType is SpecialType.System_String or SpecialType.System_Char) 689return method.ReturnType.SpecialType is SpecialType.System_String or SpecialType.System_Char;
Analyzers\CustomMarshallerAttributeFixer.cs (12)
248gen.TypeExpression(editor.SemanticModel.Compilation.GetSpecialType(SpecialType.System_Int32)), 262gen.ParameterDeclaration("numElements", type: gen.TypeExpression(SpecialType.System_Int32), refKind: RefKind.Out), 278gen.ParameterDeclaration("numElements", type: gen.TypeExpression(SpecialType.System_Int32)), 309gen.ParameterDeclaration("numElements", gen.TypeExpression(SpecialType.System_Int32)) 325gen.ParameterDeclaration("numElements", gen.TypeExpression(SpecialType.System_Int32)) 382return gen.TypeExpression(editor.SemanticModel.Compilation.GetSpecialType(SpecialType.System_IntPtr)); 396return editor.SemanticModel.Compilation.GetSpecialType(SpecialType.System_IntPtr); 460gen.TypeExpression(editor.SemanticModel.Compilation.GetSpecialType(SpecialType.System_Int32)), 493gen.ParameterDeclaration("numElements", gen.TypeExpression(SpecialType.System_Int32)) 507gen.ParameterDeclaration("numElements", gen.TypeExpression(SpecialType.System_Int32)) 549return gen.TypeExpression(editor.SemanticModel.Compilation.GetSpecialType(SpecialType.System_IntPtr)); 563return editor.SemanticModel.Compilation.GetSpecialType(SpecialType.System_IntPtr);
src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (2)
244if (parameter.Type.SpecialType == SpecialType.System_Boolean 253if (methodSymbol.ReturnType.SpecialType == SpecialType.System_Boolean
Microsoft.Interop.LibraryImportGenerator.Downlevel (1)
DownlevelStringMarshallingInfoProvider.cs (1)
26public bool CanProvideMarshallingInfoForType(ITypeSymbol type) => type.SpecialType == SpecialType.System_String;
Microsoft.Interop.SourceGeneration (86)
BooleanMarshallingInfoProvider.cs (1)
16public bool CanProvideMarshallingInfoForType(ITypeSymbol type) => type.SpecialType == SpecialType.System_Boolean;
CharMarshallingInfoProvider.cs (1)
23public bool CanProvideMarshallingInfoForType(ITypeSymbol type) => type.SpecialType == SpecialType.System_Char;
IncrementalGeneratorInitializationContextExtensions.cs (1)
37(context, ct) => SymbolEqualityComparer.Default.Equals(context.Attributes[0].AttributeClass.ContainingAssembly, context.SemanticModel.Compilation.GetSpecialType(SpecialType.System_Object).ContainingAssembly))
ManagedToNativeStubGenerator.cs (1)
88HasForwardedTypes |= generator.IsForwarder() && generator is { TypeInfo.ManagedType: not SpecialTypeInfo { SpecialType: Microsoft.CodeAnalysis.SpecialType.System_Void } };
ManagedTypeInfo.cs (13)
44if (type.SpecialType != SpecialType.None) 80public sealed record SpecialTypeInfo(string FullTypeName, string DiagnosticFormattedName, SpecialType SpecialType) : ManagedTypeInfo(FullTypeName, DiagnosticFormattedName) 82public static readonly SpecialTypeInfo Byte = new("byte", "byte", SpecialType.System_Byte); 83public static readonly SpecialTypeInfo SByte = new("sbyte", "sbyte", SpecialType.System_SByte); 84public static readonly SpecialTypeInfo Int16 = new("short", "short", SpecialType.System_Int16); 85public static readonly SpecialTypeInfo UInt16 = new("ushort", "ushort", SpecialType.System_UInt16); 86public static readonly SpecialTypeInfo Int32 = new("int", "int", SpecialType.System_Int32); 87public static readonly SpecialTypeInfo UInt32 = new("uint", "uint", SpecialType.System_UInt32); 88public static readonly SpecialTypeInfo Void = new("void", "void", SpecialType.System_Void); 89public static readonly SpecialTypeInfo String = new("string", "string", SpecialType.System_String); 90public static readonly SpecialTypeInfo Boolean = new("bool", "bool", SpecialType.System_Boolean); 91public static readonly SpecialTypeInfo IntPtr = new("nint", "nint", SpecialType.System_IntPtr); 104public sealed record EnumTypeInfo(string FullTypeName, string DiagnosticFormattedName, SpecialType UnderlyingType) : ManagedTypeInfo(FullTypeName, DiagnosticFormattedName);
MarshalAsWithCustomMarshallersParser.cs (3)
62if (elementType.SpecialType == SpecialType.System_String) 83if (type.SpecialType == SpecialType.System_String) 88if (type.SpecialType == SpecialType.System_Object && marshalAsInfo is MarshalAsScalarInfo(UnmanagedType.Struct, _))
MarshallerShape.cs (8)
316&& m.Parameters[1].Type.SpecialType == SpecialType.System_Int32 327&& m.Parameters[2].Type.SpecialType == SpecialType.System_Int32 357&& m.Parameters[1].Type.SpecialType == SpecialType.System_Int32 367&& m.Parameters[1].Type.SpecialType == SpecialType.System_Int32 377&& m.Parameters[1].Type.SpecialType == SpecialType.System_Int32 397&& m.Parameters[1].Type.SpecialType == SpecialType.System_Int32 709&& m.Parameters[0].Type.SpecialType == SpecialType.System_Int32 719&& m.Parameters[0].Type.SpecialType == SpecialType.System_Int32
Marshalling\AttributedMarshallingModelGeneratorResolver.cs (1)
111requiresCast = specialType.SpecialType != SpecialType.System_Int32;
Marshalling\BoolMarshaller.cs (1)
31Debug.Assert(info.ManagedType is SpecialTypeInfo { SpecialType: SpecialType.System_Boolean });
Marshalling\CharMarshaller.cs (1)
38Debug.Assert(info.ManagedType is SpecialTypeInfo {SpecialType: SpecialType.System_Char });
Marshalling\CharMarshallingGeneratorResolver.cs (1)
26if (info.ManagedType is SpecialTypeInfo { SpecialType: SpecialType.System_Char })
Marshalling\MarshalAsMarshallingGeneratorResolver.cs (21)
41case { ManagedType: SpecialTypeInfo { SpecialType: SpecialType.System_SByte }, MarshallingAttributeInfo: NoMarshallingInfo or MarshalAsInfo(UnmanagedType.I1, _) } 42or { ManagedType: SpecialTypeInfo { SpecialType: SpecialType.System_Byte }, MarshallingAttributeInfo: NoMarshallingInfo or MarshalAsInfo(UnmanagedType.U1, _) } 43or { ManagedType: SpecialTypeInfo { SpecialType: SpecialType.System_Int16 }, MarshallingAttributeInfo: NoMarshallingInfo or MarshalAsInfo(UnmanagedType.I2, _) } 44or { ManagedType: SpecialTypeInfo { SpecialType: SpecialType.System_UInt16 }, MarshallingAttributeInfo: NoMarshallingInfo or MarshalAsInfo(UnmanagedType.U2, _) } 45or { ManagedType: SpecialTypeInfo { SpecialType: SpecialType.System_Int32 }, MarshallingAttributeInfo: NoMarshallingInfo or MarshalAsInfo(UnmanagedType.I4 or UnmanagedType.Error, _) } 46or { ManagedType: SpecialTypeInfo { SpecialType: SpecialType.System_UInt32 }, MarshallingAttributeInfo: NoMarshallingInfo or MarshalAsInfo(UnmanagedType.U4 or UnmanagedType.Error, _) } 47or { ManagedType: SpecialTypeInfo { SpecialType: SpecialType.System_Int64 }, MarshallingAttributeInfo: NoMarshallingInfo or MarshalAsInfo(UnmanagedType.I8, _) } 48or { ManagedType: SpecialTypeInfo { SpecialType: SpecialType.System_UInt64 }, MarshallingAttributeInfo: NoMarshallingInfo or MarshalAsInfo(UnmanagedType.U8, _) } 49or { ManagedType: SpecialTypeInfo { SpecialType: SpecialType.System_IntPtr }, MarshallingAttributeInfo: NoMarshallingInfo or MarshalAsInfo(UnmanagedType.SysInt, _) } 50or { ManagedType: SpecialTypeInfo { SpecialType: SpecialType.System_UIntPtr }, MarshallingAttributeInfo: NoMarshallingInfo or MarshalAsInfo(UnmanagedType.SysUInt, _) } 51or { ManagedType: SpecialTypeInfo { SpecialType: SpecialType.System_Single }, MarshallingAttributeInfo: NoMarshallingInfo or MarshalAsInfo(UnmanagedType.R4, _) } 52or { ManagedType: SpecialTypeInfo { SpecialType: SpecialType.System_Double }, MarshallingAttributeInfo: NoMarshallingInfo or MarshalAsInfo(UnmanagedType.R8, _) }: 59SpecialType underlyingSpecialType = enumType.UnderlyingType; 60if (underlyingSpecialType == SpecialType.System_Boolean || underlyingSpecialType == SpecialType.System_Char) 75case { ManagedType: SpecialTypeInfo { SpecialType: SpecialType.System_Boolean }, MarshallingAttributeInfo: MarshalAsInfo(UnmanagedType.U1, _) }: 77case { ManagedType: SpecialTypeInfo { SpecialType: SpecialType.System_Boolean }, MarshallingAttributeInfo: MarshalAsInfo(UnmanagedType.I1, _) }: 79case { ManagedType: SpecialTypeInfo { SpecialType: SpecialType.System_Boolean }, MarshallingAttributeInfo: MarshalAsInfo(UnmanagedType.U4, _) }: 81case { ManagedType: SpecialTypeInfo { SpecialType: SpecialType.System_Boolean }, MarshallingAttributeInfo: MarshalAsInfo(UnmanagedType.I4 or UnmanagedType.Bool, _) }: 83case { ManagedType: SpecialTypeInfo { SpecialType: SpecialType.System_Boolean }, MarshallingAttributeInfo: MarshalAsInfo(UnmanagedType.VariantBool, _) }: 95case { ManagedType: SpecialTypeInfo { SpecialType: SpecialType.System_Void } }:
MarshallingAttributeInfo.cs (5)
167SpecialType.System_Void => CreateWellKnownComExceptionMarshallingData(TypeNames.ExceptionAsVoidMarshaller, unmanagedReturnType), 168SpecialType.System_Int32 => CreateWellKnownComExceptionMarshallingData($"{TypeNames.ExceptionAsHResultMarshaller}<int>", unmanagedReturnType), 169SpecialType.System_UInt32 => CreateWellKnownComExceptionMarshallingData($"{TypeNames.ExceptionAsHResultMarshaller}<uint>", unmanagedReturnType), 170SpecialType.System_Single => CreateWellKnownComExceptionMarshallingData($"{TypeNames.ExceptionAsNaNMarshaller}<float>", unmanagedReturnType), 171SpecialType.System_Double => CreateWellKnownComExceptionMarshallingData($"{TypeNames.ExceptionAsNaNMarshaller}<double>", unmanagedReturnType),
StringMarshallingInfoProvider.cs (1)
28public bool CanProvideMarshallingInfoForType(ITypeSymbol type) => type.SpecialType == SpecialType.System_String;
TypeSymbolExtensions.cs (27)
64if (t.SpecialType is not SpecialType.None) 83if (t.ContainingAssembly.Equals(compilation.GetSpecialType(SpecialType.System_Object).ContainingAssembly, SymbolEqualityComparer.Default)) 175public static bool IsIntegralType(this SpecialType type) 177return type is SpecialType.System_SByte 178or SpecialType.System_Byte 179or SpecialType.System_Int16 180or SpecialType.System_UInt16 181or SpecialType.System_Int32 182or SpecialType.System_UInt32 183or SpecialType.System_Int64 184or SpecialType.System_UInt64 185or SpecialType.System_IntPtr 186or SpecialType.System_UIntPtr; 189public static bool IsAlwaysBlittable(this SpecialType type) 191return type is SpecialType.System_Void 192or SpecialType.System_SByte 193or SpecialType.System_Byte 194or SpecialType.System_Int16 195or SpecialType.System_UInt16 196or SpecialType.System_Int32 197or SpecialType.System_UInt32 198or SpecialType.System_Int64 199or SpecialType.System_UInt64 200or SpecialType.System_IntPtr 201or SpecialType.System_UIntPtr 202or SpecialType.System_Single 203or SpecialType.System_Double;
Microsoft.Maui.Controls.BindingSourceGen (1)
ITypeSymbolExtensions.cs (1)
30 && namedTypeSymbol.ConstructedFrom.SpecialType == SpecialType.System_Nullable_T;
Microsoft.VisualStudio.LanguageServices (10)
ChangeSignature\AddParameterDialogViewModel.cs (1)
201if (TypeSymbol is { SpecialType: SpecialType.System_Void })
Library\ObjectBrowser\AbstractDescriptionBuilder.cs (1)
91typeSymbol.SpecialType == SpecialType.System_Void)
Library\ObjectBrowser\AbstractListItemFactory.cs (2)
208if (namedTypeSymbol.SpecialType == SpecialType.System_Object) 276typeSymbol.SpecialType != SpecialType.System_Object)
Library\ObjectBrowser\ObjectList.cs (1)
435if (typeSymbol.SpecialType == SpecialType.System_Object)
Library\VsNavInfo\NavInfoFactory.cs (1)
77if (typeSymbol.SpecialType == SpecialType.System_Nullable_T)
ProjectSystem\AbstractEntryPointFinder.cs (3)
37symbol.Parameters is [{ Type: IArrayTypeSymbol { ElementType.SpecialType: SpecialType.System_String } }] or []) 52if (returnType.SpecialType == SpecialType.System_Int32) 58returnType.GetTypeArguments() is [] or [{ SpecialType: SpecialType.System_Int32 }];
Venus\ContainedLanguageCodeSupport.cs (1)
193returnType: targetDocument.Project.GetCompilationAsync(cancellationToken).WaitAndGetResult_Venus(cancellationToken).GetSpecialType(SpecialType.System_Void),
Microsoft.VisualStudio.LanguageServices.CSharp (25)
CodeModel\CSharpCodeModelService.cs (16)
713case SpecialType.System_Void: 715case SpecialType.System_String: 717case SpecialType.System_Object: 719case SpecialType.System_Char: 721case SpecialType.System_Byte: 723case SpecialType.System_Boolean: 725case SpecialType.System_Int16: 727case SpecialType.System_Int32: 729case SpecialType.System_Int64: 731case SpecialType.System_Single: 733case SpecialType.System_Double: 735case SpecialType.System_Decimal: 737case SpecialType.System_UInt16: 739case SpecialType.System_UInt32: 741case SpecialType.System_UInt64: 743case SpecialType.System_SByte:
CodeModel\MethodXml\MethodXmlBuilder.cs (2)
303GenerateType(SpecialType.System_Char); 308GenerateNumber((ushort)ch, SpecialType.System_UInt16);
LanguageService\CSharpHelpContextService.cs (1)
545if (symbol is ITypeSymbol type && type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T)
ObjectBrowser\DescriptionBuilder.cs (6)
99if (underlyingType.SpecialType != SpecialType.System_Int32) 111if (baseType.SpecialType is not SpecialType.System_Object and 112not SpecialType.System_Delegate and 113not SpecialType.System_MulticastDelegate and 114not SpecialType.System_Enum and 115not SpecialType.System_ValueType)
Microsoft.VisualStudio.LanguageServices.VisualBasic (21)
CodeModel\MethodXML\MethodXmlBuilder.vb (1)
542GenerateNumber(upperBound, SemanticModel.Compilation.GetSpecialType(SpecialType.System_Int32))
CodeModel\VisualBasicCodeModelService.vb (16)
753If typeSymbol.SpecialType = SpecialType.System_Void Then 766If typeSymbol.SpecialType = SpecialType.System_Object Then 775Case SpecialType.System_Boolean 777Case SpecialType.System_SByte 779Case SpecialType.System_Byte 781Case SpecialType.System_Int16 783Case SpecialType.System_UInt16 785Case SpecialType.System_Int32 787Case SpecialType.System_UInt32 789Case SpecialType.System_Int64 791Case SpecialType.System_UInt64 793Case SpecialType.System_Decimal 795Case SpecialType.System_Single 797Case SpecialType.System_Double 799Case SpecialType.System_Char 801Case SpecialType.System_String
CodeModel\VisualBasicCodeModelService_Prototype.vb (1)
96Not methodSymbol.ReturnType.SpecialType = SpecialType.System_Void Then
Help\VisualBasicHelpContextService.vb (1)
107If type.SpecialType <> SpecialType.None Then
Help\VisualBasicHelpContextService.Visitor.vb (1)
454ElseIf TypeOf symbol Is ITypeSymbol AndAlso DirectCast(symbol, ITypeSymbol).SpecialType <> SpecialType.None Then
ObjectBrowser\DescriptionBuilder.vb (1)
113If underlyingType IsNot Nothing AndAlso underlyingType.SpecialType <> SpecialType.System_Int32 Then
Mvc.Analyzers.Test (7)
CodeAnalysisExtensionsTest.cs (7)
318Assert.Equal(attributeData.ConstructorArguments[0].Value, compilation.GetSpecialType(SpecialType.System_Object)); 323Assert.Equal(attributeData.ConstructorArguments[0].Value, compilation.GetSpecialType(SpecialType.System_String)); 361Assert.Equal(attributeData.ConstructorArguments[0].Value, compilation.GetSpecialType(SpecialType.System_Int32)); 366Assert.Equal(attributeData.ConstructorArguments[0].Value, compilation.GetSpecialType(SpecialType.System_Object)); 371Assert.Equal(attributeData.ConstructorArguments[0].Value, compilation.GetSpecialType(SpecialType.System_String)); 409Assert.Equal(attributeData.ConstructorArguments[0].Value, compilation.GetSpecialType(SpecialType.System_Int32)); 447Assert.Equal(attributeData.ConstructorArguments[0].Value, compilation.GetSpecialType(SpecialType.System_Int32));
Mvc.Api.Analyzers.Test (2)
MvcFactsTest.cs (1)
211var type = compilation.GetSpecialType(SpecialType.System_IDisposable);
SymbolApiConventionMatcherTest.cs (1)
338var type = compilation.GetSpecialType(SpecialType.System_String);
Roslyn.Diagnostics.Analyzers (445)
AbstractDoNotCopyValue.cs (1)
1565if (type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T)
AbstractRunIterations`1.cs (1)
117syntaxGenerator.TypeExpression(SpecialType.System_Int32)),
src\Compilers\Core\Portable\SpecialTypeExtensions.cs (154)
17public static bool IsClrInteger(this SpecialType specialType) 21case SpecialType.System_Boolean: 22case SpecialType.System_Char: 23case SpecialType.System_Byte: 24case SpecialType.System_SByte: 25case SpecialType.System_Int16: 26case SpecialType.System_UInt16: 27case SpecialType.System_Int32: 28case SpecialType.System_UInt32: 29case SpecialType.System_Int64: 30case SpecialType.System_UInt64: 31case SpecialType.System_IntPtr: 32case SpecialType.System_UIntPtr: 42public static bool IsBlittable(this SpecialType specialType) 46case SpecialType.System_Boolean: 47case SpecialType.System_Char: 48case SpecialType.System_Byte: 49case SpecialType.System_SByte: 50case SpecialType.System_Int16: 51case SpecialType.System_UInt16: 52case SpecialType.System_Int32: 53case SpecialType.System_UInt32: 54case SpecialType.System_Int64: 55case SpecialType.System_UInt64: 56case SpecialType.System_Single: 57case SpecialType.System_Double: 64public static bool IsValueType(this SpecialType specialType) 68case SpecialType.System_Void: 69case SpecialType.System_Boolean: 70case SpecialType.System_Char: 71case SpecialType.System_Byte: 72case SpecialType.System_SByte: 73case SpecialType.System_Int16: 74case SpecialType.System_UInt16: 75case SpecialType.System_Int32: 76case SpecialType.System_UInt32: 77case SpecialType.System_Int64: 78case SpecialType.System_UInt64: 79case SpecialType.System_Single: 80case SpecialType.System_Double: 81case SpecialType.System_Decimal: 82case SpecialType.System_IntPtr: 83case SpecialType.System_UIntPtr: 84case SpecialType.System_Nullable_T: 85case SpecialType.System_DateTime: 86case SpecialType.System_TypedReference: 87case SpecialType.System_ArgIterator: 88case SpecialType.System_RuntimeArgumentHandle: 89case SpecialType.System_RuntimeFieldHandle: 90case SpecialType.System_RuntimeMethodHandle: 91case SpecialType.System_RuntimeTypeHandle: 98public static int SizeInBytes(this SpecialType specialType) 102case SpecialType.System_SByte: 104case SpecialType.System_Byte: 106case SpecialType.System_Int16: 108case SpecialType.System_UInt16: 110case SpecialType.System_Int32: 112case SpecialType.System_UInt32: 114case SpecialType.System_Int64: 116case SpecialType.System_UInt64: 118case SpecialType.System_Char: 120case SpecialType.System_Single: 122case SpecialType.System_Double: 124case SpecialType.System_Boolean: 127case SpecialType.System_Decimal: 141public static bool IsPrimitiveRecursiveStruct(this SpecialType specialType) 145case SpecialType.System_Boolean: 146case SpecialType.System_Byte: 147case SpecialType.System_Char: 148case SpecialType.System_Double: 149case SpecialType.System_Int16: 150case SpecialType.System_Int32: 151case SpecialType.System_Int64: 152case SpecialType.System_UInt16: 153case SpecialType.System_UInt32: 154case SpecialType.System_UInt64: 155case SpecialType.System_IntPtr: 156case SpecialType.System_UIntPtr: 157case SpecialType.System_SByte: 158case SpecialType.System_Single: 165public static bool IsValidEnumUnderlyingType(this SpecialType specialType) 169case SpecialType.System_Byte: 170case SpecialType.System_SByte: 171case SpecialType.System_Int16: 172case SpecialType.System_UInt16: 173case SpecialType.System_Int32: 174case SpecialType.System_UInt32: 175case SpecialType.System_Int64: 176case SpecialType.System_UInt64: 183public static bool IsNumericType(this SpecialType specialType) 187case SpecialType.System_Byte: 188case SpecialType.System_SByte: 189case SpecialType.System_Int16: 190case SpecialType.System_UInt16: 191case SpecialType.System_Int32: 192case SpecialType.System_UInt32: 193case SpecialType.System_Int64: 194case SpecialType.System_UInt64: 195case SpecialType.System_Single: 196case SpecialType.System_Double: 197case SpecialType.System_Decimal: 207public static bool IsIntegralType(this SpecialType specialType) 211case SpecialType.System_Byte: 212case SpecialType.System_SByte: 213case SpecialType.System_Int16: 214case SpecialType.System_UInt16: 215case SpecialType.System_Int32: 216case SpecialType.System_UInt32: 217case SpecialType.System_Int64: 218case SpecialType.System_UInt64: 225public static bool IsUnsignedIntegralType(this SpecialType specialType) 229case SpecialType.System_Byte: 230case SpecialType.System_UInt16: 231case SpecialType.System_UInt32: 232case SpecialType.System_UInt64: 239public static bool IsSignedIntegralType(this SpecialType specialType) 243case SpecialType.System_SByte: 244case SpecialType.System_Int16: 245case SpecialType.System_Int32: 246case SpecialType.System_Int64: 258public static int VBForToShiftBits(this SpecialType specialType) 262case SpecialType.System_SByte: 264case SpecialType.System_Int16: 266case SpecialType.System_Int32: 268case SpecialType.System_Int64: 275public static SpecialType FromRuntimeTypeOfLiteralValue(object value) 282return SpecialType.System_Int32; 287return SpecialType.System_String; 292return SpecialType.System_Boolean; 297return SpecialType.System_Char; 302return SpecialType.System_Int64; 307return SpecialType.System_Double; 312return SpecialType.System_UInt32; 317return SpecialType.System_UInt64; 322return SpecialType.System_Single; 327return SpecialType.System_Decimal; 332return SpecialType.System_Int16; 337return SpecialType.System_UInt16; 342return SpecialType.System_DateTime; 347return SpecialType.System_Byte; 352return SpecialType.System_SByte; 355return SpecialType.None; 365public static bool CanOptimizeBehavior(this SpecialType specialType) 366=> specialType is >= SpecialType.System_Object and <= SpecialType.System_Runtime_CompilerServices_InlineArrayAttribute; 371internal static ulong ConvertUnderlyingValueToUInt64(this SpecialType enumUnderlyingType, object value) 379SpecialType.System_SByte => (ulong)(sbyte)value, 380SpecialType.System_Int16 => (ulong)(short)value, 381SpecialType.System_Int32 => (ulong)(int)value, 382SpecialType.System_Int64 => (ulong)(long)value, 383SpecialType.System_Byte => (byte)value, 384SpecialType.System_UInt16 => (ushort)value, 385SpecialType.System_UInt32 => (uint)value, 386SpecialType.System_UInt64 => (ulong)value,
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (19)
340(binaryOperation.Type.SpecialType == SpecialType.System_Boolean && 374SpecialType.System_Boolean 375or SpecialType.System_Byte 376or SpecialType.System_Char 377or SpecialType.System_Double 378or SpecialType.System_Int16 379or SpecialType.System_Int32 380or SpecialType.System_Int64 381or SpecialType.System_UInt16 382or SpecialType.System_UInt32 383or SpecialType.System_UInt64 384or SpecialType.System_IntPtr 385or SpecialType.System_UIntPtr 386or SpecialType.System_SByte 387or SpecialType.System_Single 388or SpecialType.System_String 389or SpecialType.System_Object 390or SpecialType.System_ValueType 391or SpecialType.System_Void => true,
src\RoslynAnalyzers\Utilities\Compiler\DiagnosticHelpers.cs (11)
11public static bool TryConvertToUInt64(object? value, SpecialType specialType, out ulong convertedValue) 19case SpecialType.System_Int16: 23case SpecialType.System_Int32: 27case SpecialType.System_Int64: 31case SpecialType.System_UInt16: 35case SpecialType.System_UInt32: 39case SpecialType.System_UInt64: 43case SpecialType.System_Byte: 47case SpecialType.System_SByte: 51case SpecialType.System_Char: 55case SpecialType.System_Boolean:
src\RoslynAnalyzers\Utilities\Compiler\DoNotCatchGeneralUnlessRethrown.cs (1)
104compilation.GetSpecialType(SpecialType.System_Object),
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IMethodSymbolExtensions.cs (16)
31method.ReturnType.SpecialType == SpecialType.System_Boolean && 33method.Parameters[0].Type.SpecialType == SpecialType.System_Object && 43method.ContainingType.SpecialType == SpecialType.System_Object && 46method.ReturnType.SpecialType == SpecialType.System_Boolean && 48method.Parameters[0].Type.SpecialType == SpecialType.System_Object; 58method.ContainingType.SpecialType == SpecialType.System_Object && 60method.ReturnType.SpecialType == SpecialType.System_Boolean && 61method.Parameters[0].Type.SpecialType == SpecialType.System_Object && 62method.Parameters[1].Type.SpecialType == SpecialType.System_Object && 74if (overriddenMethod.ContainingType.SpecialType == SpecialType.System_Object) 189parameter.Type.SpecialType == SpecialType.System_Boolean && 238method.Parameters[0].Type.SpecialType == SpecialType.System_Boolean; 407method.Parameters[0].Type.SpecialType == SpecialType.System_Boolean && 421method.Parameters[1].Type.SpecialType == SpecialType.System_Boolean && 500method.Parameters[0].Type.SpecialType == SpecialType.System_Object; 540method.ReturnType.SpecialType == SpecialType.System_Boolean &&
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ITypeSymbolExtensions.cs (16)
22SpecialType.System_Boolean 23or SpecialType.System_Byte 24or SpecialType.System_Char 25or SpecialType.System_Double 26or SpecialType.System_Int16 27or SpecialType.System_Int32 28or SpecialType.System_Int64 29or SpecialType.System_UInt16 30or SpecialType.System_UInt32 31or SpecialType.System_UInt64 32or SpecialType.System_SByte 33or SpecialType.System_Single 34or SpecialType.System_String => true, 251=> typeSymbol.IsValueType || typeSymbol.SpecialType == SpecialType.System_String; 259=> typeSymbol != null && typeSymbol.IsValueType && typeSymbol.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T; 265=> typeSymbol.IsNullableValueType() && ((INamedTypeSymbol)typeSymbol).TypeArguments[0].SpecialType == SpecialType.System_Boolean;
src\RoslynAnalyzers\Utilities\Workspaces\SyntaxGeneratorExtensions.cs (4)
330generator.TypeExpression(SpecialType.System_Boolean), 386generator.ParameterDeclaration(argumentName.ToString(), generator.TypeExpression(SpecialType.System_Object)) 388returnType: generator.TypeExpression(SpecialType.System_Boolean), 409returnType: generator.TypeExpression(SpecialType.System_Int32),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (2)
157type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T || 174if (type.SpecialType == SpecialType.System_String)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SemanticFacts\ISemanticFactsExtensions.cs (2)
119=> type?.SpecialType is SpecialType.System_Single or SpecialType.System_Double;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Simplification\SpecialTypeAnnotation.cs (8)
14private static readonly ConcurrentDictionary<SpecialType, string> s_fromSpecialTypes = new(); 15private static readonly ConcurrentDictionary<string, SpecialType> s_toSpecialTypes = new(); 17public static SyntaxAnnotation Create(SpecialType specialType) 20public static SpecialType GetSpecialType(SyntaxAnnotation annotation) 23private static string CreateFromSpecialTypes(SpecialType arg) 26private static SpecialType CreateToSpecialTypes(string arg) 27=> (SpecialType)Enum.Parse(typeof(SpecialType), arg);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.NamedTypeSymbolKey.cs (1)
26visitor.WriteBoolean(symbol.SpecialType == SpecialType.System_IntPtr);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (6)
758&& symbol.ContainingType.SpecialType == SpecialType.System_Object 1017if (newReceiverType.SpecialType != SpecialType.None) 1024return newSymbolContainingType.SpecialType is SpecialType.System_Array or 1025SpecialType.System_Delegate or 1026SpecialType.System_Enum or 1027SpecialType.System_String;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (9)
58private static object CreateOne(SpecialType specialType) 61SpecialType.System_SByte => (sbyte)1, 62SpecialType.System_Byte => (byte)1, 63SpecialType.System_Int16 => (short)1, 64SpecialType.System_UInt16 => (ushort)1, 65SpecialType.System_Int32 => 1, 66SpecialType.System_UInt32 => (uint)1, 67SpecialType.System_Int64 => (long)1, 68SpecialType.System_UInt64 => (ulong)1,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IntegerUtilities.cs (7)
60public static long Convert(long v, SpecialType type) 63SpecialType.System_SByte => unchecked((sbyte)v), 64SpecialType.System_Byte => unchecked((byte)v), 65SpecialType.System_Int16 => unchecked((short)v), 66SpecialType.System_UInt16 => unchecked((ushort)v), 67SpecialType.System_Int32 => unchecked((int)v), 68SpecialType.System_UInt32 => unchecked((uint)v),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\IMethodSymbolExtensions.cs (2)
46method.Parameters is [{ Type.SpecialType: SpecialType.System_Object }, var secondParam] && 107methodSymbol.ReturnType.SpecialType == SpecialType.System_Int32 ||
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (1)
664ContainingType.SpecialType: SpecialType.System_Object,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (4)
512.Select(p => (p.Type ?? compilation.GetSpecialType(SpecialType.System_Object)).WithNullableAnnotation(p.NullableAnnotation)); 517types = types.Concat((method.ReturnType ?? compilation.GetSpecialType(SpecialType.System_Object)).WithNullableAnnotation(method.ReturnNullableAnnotation)); 680if (!returnType.GetMembers().OfType<IPropertySymbol>().Any(p => p.Name == WellKnownMemberNames.IsCompleted && p.Type.SpecialType == SpecialType.System_Boolean && p.GetMethod != null)) 730ReturnType.SpecialType: SpecialType.System_Boolean,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (56)
55=> symbol?.SpecialType == SpecialType.System_Void; 58=> symbol?.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T; 268case SpecialType.System_Array or SpecialType.System_ValueType: 271case SpecialType.System_Delegate: 272case SpecialType.System_MulticastDelegate: 273case SpecialType.System_Enum: 286case SpecialType.System_Byte: 287case SpecialType.System_SByte: 288case SpecialType.System_Int16: 289case SpecialType.System_UInt16: 290case SpecialType.System_Int32: 291case SpecialType.System_UInt32: 292case SpecialType.System_Int64: 293case SpecialType.System_UInt64: 294case SpecialType.System_Single: 295case SpecialType.System_Double: 296case SpecialType.System_Decimal: 297case SpecialType.System_IntPtr when type.IsNativeIntegerType: 298case SpecialType.System_UIntPtr when type.IsNativeIntegerType: 374case SpecialType.System_Object: 375case SpecialType.System_Void: 376case SpecialType.System_Boolean: 377case SpecialType.System_SByte: 378case SpecialType.System_Byte: 379case SpecialType.System_Decimal: 380case SpecialType.System_Single: 381case SpecialType.System_Double: 382case SpecialType.System_Int16: 383case SpecialType.System_Int32: 384case SpecialType.System_Int64: 385case SpecialType.System_Char: 386case SpecialType.System_String: 387case SpecialType.System_UInt16: 388case SpecialType.System_UInt32: 389case SpecialType.System_UInt64: 390case SpecialType.System_IntPtr when symbol.IsNativeIntegerType: 391case SpecialType.System_UIntPtr when symbol.IsNativeIntegerType: 402typeSymbol.AllInterfaces.Any(static i => i.SpecialType == SpecialType.System_Collections_IEnumerable) && 651case SpecialType.System_Boolean: 652case SpecialType.System_Char: 653case SpecialType.System_SByte: 654case SpecialType.System_Byte: 655case SpecialType.System_Int16: 656case SpecialType.System_UInt16: 657case SpecialType.System_Int32: 658case SpecialType.System_UInt32: 659case SpecialType.System_Int64: 660case SpecialType.System_UInt64: 661case SpecialType.System_Decimal: 662case SpecialType.System_Single: 663case SpecialType.System_Double: 666case SpecialType.System_IntPtr: 667case SpecialType.System_UIntPtr: 670case SpecialType.System_DateTime: 759namedType.OriginalDefinition.GetAttributes().Any(static a => a.AttributeClass?.SpecialType == SpecialType.System_Runtime_CompilerServices_InlineArrayAttribute);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\PredefinedTypeExtensions.cs (41)
13public static SpecialType ToSpecialType(this PredefinedType predefinedType) 16PredefinedType.Object => SpecialType.System_Object, 17PredefinedType.Void => SpecialType.System_Void, 18PredefinedType.Boolean => SpecialType.System_Boolean, 19PredefinedType.Char => SpecialType.System_Char, 20PredefinedType.SByte => SpecialType.System_SByte, 21PredefinedType.Byte => SpecialType.System_Byte, 22PredefinedType.Int16 => SpecialType.System_Int16, 23PredefinedType.UInt16 => SpecialType.System_UInt16, 24PredefinedType.Int32 => SpecialType.System_Int32, 25PredefinedType.UInt32 => SpecialType.System_UInt32, 26PredefinedType.Int64 => SpecialType.System_Int64, 27PredefinedType.UInt64 => SpecialType.System_UInt64, 28PredefinedType.Decimal => SpecialType.System_Decimal, 29PredefinedType.Single => SpecialType.System_Single, 30PredefinedType.Double => SpecialType.System_Double, 31PredefinedType.String => SpecialType.System_String, 32PredefinedType.DateTime => SpecialType.System_DateTime, 33PredefinedType.IntPtr => SpecialType.System_IntPtr, 34PredefinedType.UIntPtr => SpecialType.System_UIntPtr, 35_ => SpecialType.None, 38public static PredefinedType ToPredefinedType(this SpecialType specialType) 41SpecialType.System_Object => PredefinedType.Object, 42SpecialType.System_Void => PredefinedType.Void, 43SpecialType.System_Boolean => PredefinedType.Boolean, 44SpecialType.System_Char => PredefinedType.Char, 45SpecialType.System_SByte => PredefinedType.SByte, 46SpecialType.System_Byte => PredefinedType.Byte, 47SpecialType.System_Int16 => PredefinedType.Int16, 48SpecialType.System_UInt16 => PredefinedType.UInt16, 49SpecialType.System_Int32 => PredefinedType.Int32, 50SpecialType.System_UInt32 => PredefinedType.UInt32, 51SpecialType.System_Int64 => PredefinedType.Int64, 52SpecialType.System_UInt64 => PredefinedType.UInt64, 53SpecialType.System_Decimal => PredefinedType.Decimal, 54SpecialType.System_Single => PredefinedType.Single, 55SpecialType.System_Double => PredefinedType.Double, 56SpecialType.System_String => PredefinedType.String, 57SpecialType.System_DateTime => PredefinedType.DateTime, 58SpecialType.System_IntPtr => PredefinedType.IntPtr, 59SpecialType.System_UIntPtr => PredefinedType.UIntPtr,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.cs (1)
198=> symbol.IsKind(SymbolKind.NamedType, out ITypeSymbol? typeSymbol) && typeSymbol.SpecialType == SpecialType.System_Object;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractFlagsEnumGenerator.cs (5)
15protected abstract SyntaxNode CreateExplicitlyCastedLiteralValue(INamedTypeSymbol enumType, SpecialType underlyingSpecialType, object constantValue); 78var underlyingSpecialType = enumType.EnumUnderlyingType.SpecialType; 138IFieldSymbol field, INamedTypeSymbol enumType, SpecialType underlyingSpecialType) 172var underlyingSpecialType = enumType.EnumUnderlyingType.SpecialType; 188var underlyingSpecialType = enumType.EnumUnderlyingType.SpecialType;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (12)
83public static bool IsSpecialType([NotNullWhen(true)] ITypeSymbol? type, SpecialType specialType) 136SpecialType.System_SByte => value is sbyte, 137SpecialType.System_Byte => value is byte, 138SpecialType.System_Int16 => value is short, 139SpecialType.System_UInt16 => value is ushort, 140SpecialType.System_Int32 => value is int, 141SpecialType.System_UInt32 => value is uint, 142SpecialType.System_Int64 => value is long, 143SpecialType.System_UInt64 => value is ulong, 144SpecialType.System_Decimal => value is decimal, 145SpecialType.System_Single => value is float, 146SpecialType.System_Double => value is double,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationSymbolFactory.cs (5)
422SpecialType specialType = SpecialType.None, 441SpecialType specialType = SpecialType.None, 493specialType: SpecialType.None,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\LiteralSpecialValues.cs (11)
16public static bool HasSpecialValues(SpecialType specialType) 20case SpecialType.System_SByte: 21case SpecialType.System_Int16: 22case SpecialType.System_UInt16: 23case SpecialType.System_Int32: 24case SpecialType.System_UInt32: 25case SpecialType.System_Int64: 26case SpecialType.System_UInt64: 27case SpecialType.System_Single: 28case SpecialType.System_Double: 29case SpecialType.System_Decimal:
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationAbstractNamedTypeSymbol.cs (1)
29SpecialType specialType,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationArrayTypeSymbol.cs (1)
10internal sealed class CodeGenerationArrayTypeSymbol(ITypeSymbol elementType, int rank, NullableAnnotation nullableAnnotation) : CodeGenerationTypeSymbol(null, null, default, Accessibility.NotApplicable, default, string.Empty, SpecialType.None, nullableAnnotation), IArrayTypeSymbol
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationMethodSymbol.cs (1)
75=> this.ReturnType == null || this.ReturnType.SpecialType == SpecialType.System_Void;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationNamedTypeSymbol.cs (1)
34SpecialType specialType,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationPointerTypeSymbol.cs (1)
9internal sealed class CodeGenerationPointerTypeSymbol(ITypeSymbol pointedAtType) : CodeGenerationTypeSymbol(null, null, default, Accessibility.NotApplicable, default, string.Empty, SpecialType.None, NullableAnnotation.None), IPointerTypeSymbol
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationTypeParameterSymbol.cs (1)
24int ordinal) : CodeGenerationTypeSymbol(containingType?.ContainingAssembly, containingType, attributes, Accessibility.NotApplicable, default, name, SpecialType.None, nullableAnnotation), ITypeParameterSymbol
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationTypeSymbol.cs (2)
19SpecialType specialType, 23public SpecialType SpecialType { get; protected set; } = specialType;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (1)
85_ => compilation.GetSpecialType(SpecialType.System_Object),
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (19)
50returnType: compilation.GetSpecialType(SpecialType.System_Boolean), 55parameters: [CodeGenerationSymbolFactory.CreateParameterSymbol(compilation.GetSpecialType(SpecialType.System_Object).WithNullableAnnotation(NullableAnnotation.Annotated), ObjName)], 411case SpecialType.System_Boolean: 412case SpecialType.System_Char: 413case SpecialType.System_SByte: 414case SpecialType.System_Byte: 415case SpecialType.System_Int16: 416case SpecialType.System_UInt16: 417case SpecialType.System_Int32: 418case SpecialType.System_UInt32: 419case SpecialType.System_Int64: 420case SpecialType.System_UInt64: 421case SpecialType.System_Decimal: 422case SpecialType.System_Single: 423case SpecialType.System_Double: 424case SpecialType.System_String: 425case SpecialType.System_DateTime: 443method.ReturnType.SpecialType == SpecialType.System_Boolean && 444method.Parameters[0].Type.SpecialType == SpecialType.System_Object &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateGetHashCodeMethod.cs (4)
136? factory.SimpleLocalDeclarationStatement(generatorInternal, compilation.GetSpecialType(SpecialType.System_Int32), HashCodeName, CreateLiteralExpression(factory, initHash)) 137: factory.LocalDeclarationStatement(compilation.GetSpecialType(SpecialType.System_Int64), HashCodeName, CreateLiteralExpression(factory, initHash))); 166compilation.GetSpecialType(SpecialType.System_Int32), 210method.ReturnType.SpecialType == SpecialType.System_Int32 &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (12)
60SpecialType? patternValueType, 184else if (operation is IIsTypeOperation { TypeOperand.SpecialType: SpecialType.System_Object } && generatorInternal.SupportsPatterns(semanticModel.SyntaxTree.Options)) 305SpecialType? patternValueType) 307if (patternValueType is SpecialType specialType && specialType.IsNumericType()) 447if (containingType?.SpecialType == SpecialType.System_Array || 448containingType?.SpecialType == SpecialType.System_String) 458case SpecialType.System_Byte: 459case SpecialType.System_UInt16: 460case SpecialType.System_UInt32: 461case SpecialType.System_UInt64: 497SpecialType? patternValueType) 504if (patternValueType == SpecialType.System_Boolean)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.AbstractTypeInferrer.cs (2)
78protected IEnumerable<TypeInferenceInfo> CreateResult(SpecialType type, NullableAnnotation nullableAnnotation = NullableAnnotation.None) 120symbol.ContainingType?.SpecialType == SpecialType.System_Enum;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.cs (1)
46? [semanticModel.Compilation.GetSpecialType(SpecialType.System_Boolean)]
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\SimplificationHelpers.cs (2)
77var specialType = SpecialTypeAnnotation.GetSpecialType(annotation2); 78if (specialType != SpecialType.None)
Roslyn.Diagnostics.CSharp.Analyzers (95)
CSharpDoNotUseDebugAssertForInterpolatedStrings.cs (2)
51if (member is IMethodSymbol { Parameters: [{ Type.SpecialType: SpecialType.System_Boolean }, { Type.SpecialType: SpecialType.System_String }] } method)
PreferNullLiteral.cs (1)
68|| namedType.OriginalDefinition.SpecialType != SpecialType.System_Nullable_T)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ITypeSymbolExtensions.cs (13)
19case SpecialType.System_Boolean: 20case SpecialType.System_Char: 21case SpecialType.System_SByte: 22case SpecialType.System_Int16: 23case SpecialType.System_Int32: 24case SpecialType.System_Int64: 25case SpecialType.System_Byte: 26case SpecialType.System_UInt16: 27case SpecialType.System_UInt32: 28case SpecialType.System_UInt64: 29case SpecialType.System_Single: 30case SpecialType.System_Double: 33case SpecialType.System_Decimal:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (18)
96while (current is IConversionOperation { Type.SpecialType: SpecialType.System_Delegate or SpecialType.System_MulticastDelegate }) 99if (current is IConversionOperation { Type.SpecialType: SpecialType.System_Object }) 552if (castNode.IsParentKind(SyntaxKind.Interpolation) && originalConversionOperation.Type?.SpecialType is SpecialType.System_Object) 647if (originalNamedConvertedType.OriginalDefinition.SpecialType is SpecialType.System_Collections_Generic_IEnumerable_T && 648namedCastedType.OriginalDefinition.SpecialType is SpecialType.System_Collections_Generic_IReadOnlyCollection_T or SpecialType.System_Collections_Generic_IReadOnlyList_T) 654if (originalNamedConvertedType.OriginalDefinition.SpecialType is SpecialType.System_Collections_Generic_ICollection_T && 655namedCastedType.OriginalDefinition.SpecialType is SpecialType.System_Collections_Generic_IList_T) 661if (originalNamedConvertedType.OriginalDefinition.SpecialType is SpecialType.System_Collections_Generic_ICollection_T or SpecialType.System_Collections_Generic_IList_T && 726if (current.ContainingType.SpecialType == SpecialType.System_Object) 822=> type.IsSignedIntegralType() || type?.SpecialType is SpecialType.System_IntPtr; 958if (binaryOperation.LeftOperand.Type?.SpecialType == SpecialType.System_Object && 965else if (binaryOperation.RightOperand.Type?.SpecialType == SpecialType.System_Object && 1148=> type?.SpecialType is SpecialType.System_Double or SpecialType.System_Single; 1435rewrittenType.SpecialType == SpecialType.System_Enum;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpFlagsEnumGenerator.cs (1)
23SpecialType underlyingSpecialType,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ExpressionGenerator.cs (6)
124var isNotSingle = !IsSpecialType(type, SpecialType.System_Single); 135if (value is double && !IsSpecialType(type, SpecialType.System_Double)) 140if (value is uint && !IsSpecialType(type, SpecialType.System_UInt32)) 145if (value is long && !IsSpecialType(type, SpecialType.System_Int64)) 150if (value is ulong && !IsSpecialType(type, SpecialType.System_UInt64)) 159var isNotDecimal = !IsSpecialType(type, SpecialType.System_Decimal);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\NamedTypeGenerator.cs (2)
247var baseList = namedType.EnumUnderlyingType != null && namedType.EnumUnderlyingType.SpecialType != SpecialType.System_Int32 318if (namedType.TypeKind == TypeKind.Class && namedType.BaseType != null && namedType.BaseType.SpecialType != Microsoft.CodeAnalysis.SpecialType.System_Object)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ExpressionSyntaxExtensions.cs (1)
116targetType = semanticModel.Compilation.GetSpecialType(SpecialType.System_Object);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\InternalExtensions.cs (1)
33if (typeInfo.Type != null && typeInfo.Type.SpecialType == SpecialType.System_Void)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeParameterSymbolExtensions.cs (1)
65if (type.SpecialType != SpecialType.System_Object)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (2)
122syntax = IdentifierName(symbol.SpecialType == SpecialType.System_IntPtr ? "nint" : "nuint"); 226if (symbol.SpecialType == SpecialType.System_Void)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpSyntaxGeneratorInternal.cs (12)
264case SpecialType.System_Boolean: 266case SpecialType.System_SByte: 267case SpecialType.System_Byte: 268case SpecialType.System_Int16: 269case SpecialType.System_UInt16: 270case SpecialType.System_Int32: 271case SpecialType.System_UInt32: 272case SpecialType.System_Int64: 273case SpecialType.System_UInt64: 274case SpecialType.System_Decimal: 275case SpecialType.System_Single: 276case SpecialType.System_Double:
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (35)
585return CreateResult(this.Compilation.GetSpecialType(SpecialType.System_Int32)); 844return CreateResult(this.Compilation.GetSpecialType(SpecialType.System_Int32)); 968return CreateResult(this.Compilation.GetSpecialType(SpecialType.System_Int32)); 978return CreateResult(SpecialType.System_Boolean); 1033if (parentTypes.Any(static parentType => parentType.InferredType.SpecialType == SpecialType.System_String || parentType.InferredType.TypeKind == TypeKind.Delegate)) 1035return parentTypes.Where(parentType => parentType.InferredType.SpecialType == SpecialType.System_String || parentType.InferredType.TypeKind == TypeKind.Delegate); 1066return CreateResult(this.Compilation.GetSpecialType(SpecialType.System_Int32)); 1073return CreateResult(SpecialType.System_Boolean); 1106return CreateResult(SpecialType.System_Boolean); 1129return CreateResult(SpecialType.System_Object, NullableAnnotation.Annotated); 1143else if (symbol.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T) 1150return compilation.GetSpecialType(SpecialType.System_Nullable_T).Construct(symbol); 1171return CreateResult(SpecialType.System_Boolean); 1205return CreateResult(SpecialType.System_Boolean); 1244return CreateResult(SpecialType.System_Void); 1257? this.Compilation.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T) 1260enumerableType ??= this.Compilation.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T); 1268.Construct(Compilation.GetSpecialType(SpecialType.System_Object))); 1283return CreateResult(SpecialType.System_Boolean); 1292return CreateResult(SpecialType.System_Boolean); 1601return CreateResult(SpecialType.System_Object); 1897return CreateResult(this.Compilation.GetSpecialType(SpecialType.System_Int32)); 1915return CreateResult(this.Compilation.GetSpecialType(SpecialType.System_Int32)); 1922return CreateResult(this.Compilation.GetSpecialType(SpecialType.System_Int32)); 1931return CreateResult(SpecialType.System_Boolean); 1978return types.Select(t => t.InferredType.SpecialType == SpecialType.System_Void ? new TypeInferenceInfo(task) : new TypeInferenceInfo(taskOfT.Construct(t.InferredType))); 2014return this.Compilation.GetSpecialType(SpecialType.System_Void); 2142return CreateResult(this.Compilation.GetSpecialType(SpecialType.System_Int32)); 2169return CreateResult(SpecialType.System_IDisposable); 2193return CreateResult(SpecialType.System_IDisposable); 2197return CreateResult(this.Compilation.GetSpecialType(SpecialType.System_Int32)); 2200if (laterUsageInference is not [] and not [{ InferredType.SpecialType: SpecialType.System_Object }]) 2229if (inferredDescendantTypes is not [] and not [{ InferredType.SpecialType: SpecialType.System_Object }]) 2374return [new TypeInferenceInfo(Compilation.GetSpecialType(SpecialType.System_Boolean))]; 2383return CreateResult(SpecialType.System_Boolean);
Roslyn.Diagnostics.VisualBasic.Analyzers (156)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\ExpressionSyntaxExtensions.vb (1)
111If typeInfo.Type IsNot Nothing AndAlso typeInfo.Type.SpecialType = SpecialType.System_Void Then
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Utilities\CastAnalyzer.vb (15)
225If If(castType?.SpecialType = SpecialType.System_Object, False) AndAlso 319DirectCast(castExpressionType.OriginalDefinition, ITypeSymbol).SpecialType = SpecialType.System_Nullable_T 381Case SpecialType.System_Single, SpecialType.System_Double 383Case SpecialType.System_UInt32, SpecialType.System_Int32, 384SpecialType.System_UInt64, SpecialType.System_Int64, 385SpecialType.System_Decimal 397ElseIf castType.SpecialType = SpecialType.System_DateTime Then 398Return Not outerType.SpecialType = SpecialType.System_DateTime 399ElseIf castType.SpecialType = SpecialType.System_Boolean Then 400Return Not (outerType.IsNumericType OrElse outerType.SpecialType = SpecialType.System_Boolean) 403If castType.OriginalDefinition?.SpecialType = SpecialType.System_Nullable_T Then 415If castType.Equals(outerType) OrElse outerType.SpecialType = SpecialType.System_Object Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\ExpressionGenerator.vb (28)
71Return GenerateIntegralLiteralExpression(type, SpecialType.System_SByte, DirectCast(value, SByte), canUseFieldReference, LiteralSpecialValues.SByteSpecialValues, Function(x) x < 0, Function(x) -x, "128") 73Return GenerateIntegralLiteralExpression(type, SpecialType.System_Int16, DirectCast(value, Short), canUseFieldReference, LiteralSpecialValues.Int16SpecialValues, Function(x) x < 0, Function(x) -x, "32768") 75Return GenerateIntegralLiteralExpression(type, SpecialType.System_Int32, DirectCast(value, Integer), canUseFieldReference, LiteralSpecialValues.Int32SpecialValues, Function(x) x < 0, Function(x) -x, "2147483648") 77Return GenerateIntegralLiteralExpression(type, SpecialType.System_Int64, DirectCast(value, Long), canUseFieldReference, LiteralSpecialValues.Int64SpecialValues, Function(x) x < 0, Function(x) -x, "9223372036854775808") 79Return GenerateNonNegativeIntegralLiteralExpression(type, SpecialType.System_Byte, DirectCast(value, Byte), canUseFieldReference, LiteralSpecialValues.ByteSpecialValues) 81Return GenerateNonNegativeIntegralLiteralExpression(type, SpecialType.System_UInt16, DirectCast(value, UShort), canUseFieldReference, LiteralSpecialValues.UInt16SpecialValues) 83Return GenerateNonNegativeIntegralLiteralExpression(type, SpecialType.System_UInt32, DirectCast(value, UInteger), canUseFieldReference, LiteralSpecialValues.UInt32SpecialValues) 85Return GenerateNonNegativeIntegralLiteralExpression(type, SpecialType.System_UInt64, DirectCast(value, ULong), canUseFieldReference, LiteralSpecialValues.UInt64SpecialValues) 116If Not IsSpecialType(type, SpecialType.System_String) Then 163specialType As SpecialType, 179specialType As SpecialType, 216If TypeOf value Is Byte AndAlso Not IsSpecialType(type, SpecialType.System_Byte) Then 218ElseIf TypeOf value Is SByte AndAlso Not IsSpecialType(type, SpecialType.System_SByte) Then 229If TypeOf value Is Short AndAlso Not IsSpecialType(type, SpecialType.System_Int16) Then 232ElseIf TypeOf value Is Long AndAlso Not IsSpecialType(type, SpecialType.System_Int64) Then 239Dim typeIsNotDecimal = Not IsSpecialType(type, SpecialType.System_Decimal) 249ElseIf TypeOf value Is UShort AndAlso Not IsSpecialType(type, SpecialType.System_UInt16) Then 252ElseIf TypeOf value Is UInteger AndAlso Not IsSpecialType(type, SpecialType.System_UInt32) Then 258Dim typeIsNotULong = Not IsSpecialType(type, SpecialType.System_UInt64) 266ElseIf TypeOf value Is Single AndAlso Not IsSpecialType(type, SpecialType.System_Single) Then 269ElseIf TypeOf value Is Double AndAlso Not IsSpecialType(type, SpecialType.System_Double) Then 295type, SpecialType.System_Double, value, canUseFieldReference, 320type, SpecialType.System_Single, value, canUseFieldReference, 326specialType As SpecialType, 375Dim field = GenerateFieldReference(SpecialType.System_Decimal, value, LiteralSpecialValues.DecimalSpecialValues) 389Private Function AddSpecialTypeAnnotation(type As SpecialType, expression As MemberAccessExpressionSyntax) As MemberAccessExpressionSyntax 390If SpecialType.None <> type Then 397Private Function GenerateFieldReference(Of TStructure)(type As SpecialType,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ITypeSymbolExtensions.vb (49)
19Public Function GetPredefinedCastKeyword(specialType As SpecialType) As SyntaxKind 21Case specialType.System_Boolean 23Case specialType.System_Byte 25Case specialType.System_Char 27Case specialType.System_DateTime 29Case specialType.System_Decimal 31Case specialType.System_Double 33Case specialType.System_Int32 35Case specialType.System_Int64 37Case specialType.System_Object 39Case specialType.System_SByte 41Case specialType.System_Single 43Case specialType.System_Int16 45Case SpecialType.System_String 47Case specialType.System_UInt32 49Case specialType.System_UInt64 51Case specialType.System_UInt16 60Dim specialType As SpecialType 63specialType = specialType.System_Boolean 65specialType = specialType.System_Byte 67specialType = specialType.System_Char 69specialType = specialType.System_DateTime 71specialType = specialType.System_Decimal 73specialType = specialType.System_Double 75specialType = specialType.System_Int32 77specialType = specialType.System_Int64 79specialType = specialType.System_Object 81specialType = specialType.System_SByte 83specialType = specialType.System_Single 85specialType = specialType.System_String 87specialType = specialType.System_Int16 89specialType = specialType.System_UInt32 91specialType = specialType.System_UInt64 93specialType = specialType.System_UInt16 104Case SpecialType.System_Boolean, 105SpecialType.System_Byte, 106SpecialType.System_SByte, 107SpecialType.System_Int16, 108SpecialType.System_UInt16, 109SpecialType.System_Int32, 110SpecialType.System_UInt32, 111SpecialType.System_Int64, 112SpecialType.System_UInt64, 113SpecialType.System_Single, 114SpecialType.System_Double, 115SpecialType.System_Decimal, 116SpecialType.System_DateTime, 117SpecialType.System_Char, 118SpecialType.System_String
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\StringExtensions.vb (16)
97Case SpecialType.System_Boolean, 98SpecialType.System_Byte, 99SpecialType.System_SByte, 100SpecialType.System_Int16, 101SpecialType.System_UInt16, 102SpecialType.System_Int32, 103SpecialType.System_UInt32, 104SpecialType.System_Int64, 105SpecialType.System_UInt64, 106SpecialType.System_Single, 107SpecialType.System_Double, 108SpecialType.System_Decimal, 109SpecialType.System_DateTime, 110SpecialType.System_Char, 111SpecialType.System_String, 112SpecialType.System_Object
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\TypeSyntaxGeneratorVisitor.vb (17)
81If symbol.OriginalDefinition.SpecialType = SpecialType.System_Nullable_T Then 96Case SpecialType.System_Object 98Case SpecialType.System_Boolean 100Case SpecialType.System_Char 102Case SpecialType.System_SByte 104Case SpecialType.System_Byte 106Case SpecialType.System_Int16 108Case SpecialType.System_UInt16 110Case SpecialType.System_Int32 112Case SpecialType.System_Int64 114Case SpecialType.System_UInt32 116Case SpecialType.System_UInt64 118Case SpecialType.System_Decimal 120Case SpecialType.System_Single 122Case SpecialType.System_Double 124Case SpecialType.System_String 126Case SpecialType.System_DateTime
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicTypeInferenceService.TypeInferrer.vb (30)
235Return CreateResult(Compilation.GetSpecialType(SpecialType.System_Int32)) 282Return CreateResult(Compilation.GetSpecialType(SpecialType.System_Int32)) 412Return CreateResult(Me.Compilation.GetSpecialType(SpecialType.System_Int32)) 452Return CreateResult(Me.Compilation.GetSpecialType(SpecialType.System_Int32)) 486Return types.Select(Function(t) New TypeInferenceInfo(If(t.InferredType.SpecialType = SpecialType.System_Void, task, taskOfT.Construct(t.InferredType)))) 505New TypeInferenceInfo(Me.Compilation.GetSpecialType(SpecialType.System_Nullable_T).Construct(t.InferredType)), 511If t.InferredType.OriginalDefinition.SpecialType = SpecialType.System_Nullable_T Then 534Return CreateResult(Me.Compilation.GetSpecialType(SpecialType.System_Int32)) 544If otherSideTypes.Any(Function(t) t.InferredType.SpecialType <> SpecialType.System_Object AndAlso Not t.InferredType.IsErrorType()) Then 568Return CreateResult(Me.Compilation.GetSpecialType(SpecialType.System_Int32)) 574Return CreateResult(SpecialType.System_Boolean) 594Return CreateResult(SpecialType.System_Boolean) 598Return CreateResult(SpecialType.System_Boolean) 605Return CreateResult(SpecialType.System_IDisposable) 648Return CreateResult(SpecialType.System_Void) 660Dim type = Me.Compilation.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T) 664Dim type = Me.Compilation.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T) 665Return CreateResult(type.Construct(Compilation.GetSpecialType(SpecialType.System_Object))) 694Return CreateResult(Me.Compilation.GetSpecialType(SpecialType.System_Int32)) 698Return CreateResult(SpecialType.System_Boolean) 773If memberType.OriginalDefinition.SpecialType = SpecialType.System_Collections_Generic_IEnumerable_T OrElse 774memberType.OriginalDefinition.SpecialType = SpecialType.System_Collections_Generic_IEnumerator_T Then 806Return CreateResult(Me.Compilation.GetSpecialType(SpecialType.System_Int32)) 815Return CreateResult(SpecialType.System_Boolean) 823Return CreateResult(SpecialType.System_Boolean) 841Return CreateResult(Me.Compilation.GetSpecialType(SpecialType.System_Int32)) 848Return CreateResult(SpecialType.System_Boolean) 857Return CreateResult(SpecialType.System_IDisposable) 869Return CreateResult(SpecialType.System_Boolean) 873Return CreateResult(SpecialType.System_Boolean)
System.Private.CoreLib.Generators (1)
IntrinsicsInSystemPrivateCoreLibAnalyzer.cs (1)
455if (symbol == null || symbol is ITypeSymbol type && type.SpecialType != SpecialType.None)
System.Text.Json.SourceGeneration (34)
Helpers\KnownTypeSymbols.cs (6)
124public INamedTypeSymbol ObjectType => _ObjectType ??= Compilation.GetSpecialType(SpecialType.System_Object); 127public INamedTypeSymbol StringType => _StringType ??= Compilation.GetSpecialType(SpecialType.System_String); 153: (_ByteArrayType = new(Compilation.CreateArrayTypeSymbol(Compilation.GetSpecialType(SpecialType.System_Byte), rank: 1))).Value; 159: (_MemoryByteType = new(MemoryType?.Construct(Compilation.GetSpecialType(SpecialType.System_Byte)))).Value; 165: (_ReadOnlyMemoryByteType = new(ReadOnlyMemoryType?.Construct(Compilation.GetSpecialType(SpecialType.System_Byte)))).Value; 244public INamedTypeSymbol? DelegateType => _DelegateType ??= Compilation.GetSpecialType(SpecialType.System_Delegate);
Helpers\RoslynExtensions.cs (13)
193SpecialType.System_SByte or SpecialType.System_Int16 or SpecialType.System_Int32 or SpecialType.System_Int64 or 194SpecialType.System_Byte or SpecialType.System_UInt16 or SpecialType.System_UInt32 or SpecialType.System_UInt64 or 195SpecialType.System_Single or SpecialType.System_Double or SpecialType.System_Decimal; 199=> !type.IsValueType || type.OriginalDefinition.SpecialType is SpecialType.System_Nullable_T; 203if (type.IsValueType && type is INamedTypeSymbol { OriginalDefinition.SpecialType: SpecialType.System_Nullable_T })
JsonSourceGenerator.Parser.cs (9)
1669if (type.SpecialType is SpecialType.System_Boolean) 1674if (type.SpecialType is SpecialType.System_Char) 1681if (type.SpecialType is SpecialType.System_String or SpecialType.System_DateTime || 1809SpecialType.System_Boolean or 1810SpecialType.System_Char or 1811SpecialType.System_DateTime or 1812SpecialType.System_String or 1813SpecialType.System_Object ||
Model\TypeGenerationSpec.cs (4)
122if (property.PropertyType.SpecialType is SpecialType.System_Object || 134CollectionValueType!.SpecialType is not SpecialType.System_Object; 137return CollectionKeyType!.SpecialType is SpecialType.System_String && 138CollectionValueType!.SpecialType is not SpecialType.System_Object;
src\libraries\Common\src\SourceGenerators\TypeRef.cs (2)
34public SpecialType SpecialType { get; } 36public bool CanBeNull => !IsValueType || SpecialType is SpecialType.System_Nullable_T;
System.Text.RegularExpressions.Generator (1)
RegexGenerator.Parser.cs (1)
96if (items[2].Type?.SpecialType == SpecialType.System_Int32)
System.Windows.Forms.Analyzers.CSharp (1)
System\Windows\Forms\CSharp\Analyzers\MissingPropertySerializationConfiguration\MissingPropertySerializationConfigurationAnalyzer.cs (1)
94|| shouldSerializeMethod.ReturnType.SpecialType != SpecialType.System_Boolean
System.Windows.Forms.Analyzers.VisualBasic (1)
Analyzers\MissingPropertySerializationConfiguration\MissingPropertySerializationConfigurationDiagnosticAnalyzer.vb (1)
92shouldSerializeMethod.ReturnType.SpecialType <> SpecialType.System_Boolean OrElse
Test.Utilities (342)
src\Compilers\Core\Portable\SpecialTypeExtensions.cs (154)
17public static bool IsClrInteger(this SpecialType specialType) 21case SpecialType.System_Boolean: 22case SpecialType.System_Char: 23case SpecialType.System_Byte: 24case SpecialType.System_SByte: 25case SpecialType.System_Int16: 26case SpecialType.System_UInt16: 27case SpecialType.System_Int32: 28case SpecialType.System_UInt32: 29case SpecialType.System_Int64: 30case SpecialType.System_UInt64: 31case SpecialType.System_IntPtr: 32case SpecialType.System_UIntPtr: 42public static bool IsBlittable(this SpecialType specialType) 46case SpecialType.System_Boolean: 47case SpecialType.System_Char: 48case SpecialType.System_Byte: 49case SpecialType.System_SByte: 50case SpecialType.System_Int16: 51case SpecialType.System_UInt16: 52case SpecialType.System_Int32: 53case SpecialType.System_UInt32: 54case SpecialType.System_Int64: 55case SpecialType.System_UInt64: 56case SpecialType.System_Single: 57case SpecialType.System_Double: 64public static bool IsValueType(this SpecialType specialType) 68case SpecialType.System_Void: 69case SpecialType.System_Boolean: 70case SpecialType.System_Char: 71case SpecialType.System_Byte: 72case SpecialType.System_SByte: 73case SpecialType.System_Int16: 74case SpecialType.System_UInt16: 75case SpecialType.System_Int32: 76case SpecialType.System_UInt32: 77case SpecialType.System_Int64: 78case SpecialType.System_UInt64: 79case SpecialType.System_Single: 80case SpecialType.System_Double: 81case SpecialType.System_Decimal: 82case SpecialType.System_IntPtr: 83case SpecialType.System_UIntPtr: 84case SpecialType.System_Nullable_T: 85case SpecialType.System_DateTime: 86case SpecialType.System_TypedReference: 87case SpecialType.System_ArgIterator: 88case SpecialType.System_RuntimeArgumentHandle: 89case SpecialType.System_RuntimeFieldHandle: 90case SpecialType.System_RuntimeMethodHandle: 91case SpecialType.System_RuntimeTypeHandle: 98public static int SizeInBytes(this SpecialType specialType) 102case SpecialType.System_SByte: 104case SpecialType.System_Byte: 106case SpecialType.System_Int16: 108case SpecialType.System_UInt16: 110case SpecialType.System_Int32: 112case SpecialType.System_UInt32: 114case SpecialType.System_Int64: 116case SpecialType.System_UInt64: 118case SpecialType.System_Char: 120case SpecialType.System_Single: 122case SpecialType.System_Double: 124case SpecialType.System_Boolean: 127case SpecialType.System_Decimal: 141public static bool IsPrimitiveRecursiveStruct(this SpecialType specialType) 145case SpecialType.System_Boolean: 146case SpecialType.System_Byte: 147case SpecialType.System_Char: 148case SpecialType.System_Double: 149case SpecialType.System_Int16: 150case SpecialType.System_Int32: 151case SpecialType.System_Int64: 152case SpecialType.System_UInt16: 153case SpecialType.System_UInt32: 154case SpecialType.System_UInt64: 155case SpecialType.System_IntPtr: 156case SpecialType.System_UIntPtr: 157case SpecialType.System_SByte: 158case SpecialType.System_Single: 165public static bool IsValidEnumUnderlyingType(this SpecialType specialType) 169case SpecialType.System_Byte: 170case SpecialType.System_SByte: 171case SpecialType.System_Int16: 172case SpecialType.System_UInt16: 173case SpecialType.System_Int32: 174case SpecialType.System_UInt32: 175case SpecialType.System_Int64: 176case SpecialType.System_UInt64: 183public static bool IsNumericType(this SpecialType specialType) 187case SpecialType.System_Byte: 188case SpecialType.System_SByte: 189case SpecialType.System_Int16: 190case SpecialType.System_UInt16: 191case SpecialType.System_Int32: 192case SpecialType.System_UInt32: 193case SpecialType.System_Int64: 194case SpecialType.System_UInt64: 195case SpecialType.System_Single: 196case SpecialType.System_Double: 197case SpecialType.System_Decimal: 207public static bool IsIntegralType(this SpecialType specialType) 211case SpecialType.System_Byte: 212case SpecialType.System_SByte: 213case SpecialType.System_Int16: 214case SpecialType.System_UInt16: 215case SpecialType.System_Int32: 216case SpecialType.System_UInt32: 217case SpecialType.System_Int64: 218case SpecialType.System_UInt64: 225public static bool IsUnsignedIntegralType(this SpecialType specialType) 229case SpecialType.System_Byte: 230case SpecialType.System_UInt16: 231case SpecialType.System_UInt32: 232case SpecialType.System_UInt64: 239public static bool IsSignedIntegralType(this SpecialType specialType) 243case SpecialType.System_SByte: 244case SpecialType.System_Int16: 245case SpecialType.System_Int32: 246case SpecialType.System_Int64: 258public static int VBForToShiftBits(this SpecialType specialType) 262case SpecialType.System_SByte: 264case SpecialType.System_Int16: 266case SpecialType.System_Int32: 268case SpecialType.System_Int64: 275public static SpecialType FromRuntimeTypeOfLiteralValue(object value) 282return SpecialType.System_Int32; 287return SpecialType.System_String; 292return SpecialType.System_Boolean; 297return SpecialType.System_Char; 302return SpecialType.System_Int64; 307return SpecialType.System_Double; 312return SpecialType.System_UInt32; 317return SpecialType.System_UInt64; 322return SpecialType.System_Single; 327return SpecialType.System_Decimal; 332return SpecialType.System_Int16; 337return SpecialType.System_UInt16; 342return SpecialType.System_DateTime; 347return SpecialType.System_Byte; 352return SpecialType.System_SByte; 355return SpecialType.None; 365public static bool CanOptimizeBehavior(this SpecialType specialType) 366=> specialType is >= SpecialType.System_Object and <= SpecialType.System_Runtime_CompilerServices_InlineArrayAttribute; 371internal static ulong ConvertUnderlyingValueToUInt64(this SpecialType enumUnderlyingType, object value) 379SpecialType.System_SByte => (ulong)(sbyte)value, 380SpecialType.System_Int16 => (ulong)(short)value, 381SpecialType.System_Int32 => (ulong)(int)value, 382SpecialType.System_Int64 => (ulong)(long)value, 383SpecialType.System_Byte => (byte)value, 384SpecialType.System_UInt16 => (ushort)value, 385SpecialType.System_UInt32 => (uint)value, 386SpecialType.System_UInt64 => (ulong)value,
src\RoslynAnalyzers\Utilities\Compiler\DiagnosticHelpers.cs (11)
11public static bool TryConvertToUInt64(object? value, SpecialType specialType, out ulong convertedValue) 19case SpecialType.System_Int16: 23case SpecialType.System_Int32: 27case SpecialType.System_Int64: 31case SpecialType.System_UInt16: 35case SpecialType.System_UInt32: 39case SpecialType.System_UInt64: 43case SpecialType.System_Byte: 47case SpecialType.System_SByte: 51case SpecialType.System_Char: 55case SpecialType.System_Boolean:
src\RoslynAnalyzers\Utilities\Compiler\DoNotCatchGeneralUnlessRethrown.cs (1)
104compilation.GetSpecialType(SpecialType.System_Object),
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IMethodSymbolExtensions.cs (16)
31method.ReturnType.SpecialType == SpecialType.System_Boolean && 33method.Parameters[0].Type.SpecialType == SpecialType.System_Object && 43method.ContainingType.SpecialType == SpecialType.System_Object && 46method.ReturnType.SpecialType == SpecialType.System_Boolean && 48method.Parameters[0].Type.SpecialType == SpecialType.System_Object; 58method.ContainingType.SpecialType == SpecialType.System_Object && 60method.ReturnType.SpecialType == SpecialType.System_Boolean && 61method.Parameters[0].Type.SpecialType == SpecialType.System_Object && 62method.Parameters[1].Type.SpecialType == SpecialType.System_Object && 74if (overriddenMethod.ContainingType.SpecialType == SpecialType.System_Object) 189parameter.Type.SpecialType == SpecialType.System_Boolean && 238method.Parameters[0].Type.SpecialType == SpecialType.System_Boolean; 407method.Parameters[0].Type.SpecialType == SpecialType.System_Boolean && 421method.Parameters[1].Type.SpecialType == SpecialType.System_Boolean && 500method.Parameters[0].Type.SpecialType == SpecialType.System_Object; 540method.ReturnType.SpecialType == SpecialType.System_Boolean &&
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ITypeSymbolExtensions.cs (16)
22SpecialType.System_Boolean 23or SpecialType.System_Byte 24or SpecialType.System_Char 25or SpecialType.System_Double 26or SpecialType.System_Int16 27or SpecialType.System_Int32 28or SpecialType.System_Int64 29or SpecialType.System_UInt16 30or SpecialType.System_UInt32 31or SpecialType.System_UInt64 32or SpecialType.System_SByte 33or SpecialType.System_Single 34or SpecialType.System_String => true, 251=> typeSymbol.IsValueType || typeSymbol.SpecialType == SpecialType.System_String; 259=> typeSymbol != null && typeSymbol.IsValueType && typeSymbol.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T; 265=> typeSymbol.IsNullableValueType() && ((INamedTypeSymbol)typeSymbol).TypeArguments[0].SpecialType == SpecialType.System_Boolean;
src\RoslynAnalyzers\Utilities\Workspaces\SyntaxGeneratorExtensions.cs (4)
330generator.TypeExpression(SpecialType.System_Boolean), 386generator.ParameterDeclaration(argumentName.ToString(), generator.TypeExpression(SpecialType.System_Object)) 388returnType: generator.TypeExpression(SpecialType.System_Boolean), 409returnType: generator.TypeExpression(SpecialType.System_Int32),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (2)
157type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T || 174if (type.SpecialType == SpecialType.System_String)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SemanticFacts\ISemanticFactsExtensions.cs (2)
119=> type?.SpecialType is SpecialType.System_Single or SpecialType.System_Double;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Simplification\SpecialTypeAnnotation.cs (8)
14private static readonly ConcurrentDictionary<SpecialType, string> s_fromSpecialTypes = new(); 15private static readonly ConcurrentDictionary<string, SpecialType> s_toSpecialTypes = new(); 17public static SyntaxAnnotation Create(SpecialType specialType) 20public static SpecialType GetSpecialType(SyntaxAnnotation annotation) 23private static string CreateFromSpecialTypes(SpecialType arg) 26private static SpecialType CreateToSpecialTypes(string arg) 27=> (SpecialType)Enum.Parse(typeof(SpecialType), arg);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.NamedTypeSymbolKey.cs (1)
26visitor.WriteBoolean(symbol.SpecialType == SpecialType.System_IntPtr);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (6)
758&& symbol.ContainingType.SpecialType == SpecialType.System_Object 1017if (newReceiverType.SpecialType != SpecialType.None) 1024return newSymbolContainingType.SpecialType is SpecialType.System_Array or 1025SpecialType.System_Delegate or 1026SpecialType.System_Enum or 1027SpecialType.System_String;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (9)
58private static object CreateOne(SpecialType specialType) 61SpecialType.System_SByte => (sbyte)1, 62SpecialType.System_Byte => (byte)1, 63SpecialType.System_Int16 => (short)1, 64SpecialType.System_UInt16 => (ushort)1, 65SpecialType.System_Int32 => 1, 66SpecialType.System_UInt32 => (uint)1, 67SpecialType.System_Int64 => (long)1, 68SpecialType.System_UInt64 => (ulong)1,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IntegerUtilities.cs (7)
60public static long Convert(long v, SpecialType type) 63SpecialType.System_SByte => unchecked((sbyte)v), 64SpecialType.System_Byte => unchecked((byte)v), 65SpecialType.System_Int16 => unchecked((short)v), 66SpecialType.System_UInt16 => unchecked((ushort)v), 67SpecialType.System_Int32 => unchecked((int)v), 68SpecialType.System_UInt32 => unchecked((uint)v),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\IMethodSymbolExtensions.cs (2)
46method.Parameters is [{ Type.SpecialType: SpecialType.System_Object }, var secondParam] && 107methodSymbol.ReturnType.SpecialType == SpecialType.System_Int32 ||
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (1)
664ContainingType.SpecialType: SpecialType.System_Object,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (4)
512.Select(p => (p.Type ?? compilation.GetSpecialType(SpecialType.System_Object)).WithNullableAnnotation(p.NullableAnnotation)); 517types = types.Concat((method.ReturnType ?? compilation.GetSpecialType(SpecialType.System_Object)).WithNullableAnnotation(method.ReturnNullableAnnotation)); 680if (!returnType.GetMembers().OfType<IPropertySymbol>().Any(p => p.Name == WellKnownMemberNames.IsCompleted && p.Type.SpecialType == SpecialType.System_Boolean && p.GetMethod != null)) 730ReturnType.SpecialType: SpecialType.System_Boolean,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (56)
55=> symbol?.SpecialType == SpecialType.System_Void; 58=> symbol?.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T; 268case SpecialType.System_Array or SpecialType.System_ValueType: 271case SpecialType.System_Delegate: 272case SpecialType.System_MulticastDelegate: 273case SpecialType.System_Enum: 286case SpecialType.System_Byte: 287case SpecialType.System_SByte: 288case SpecialType.System_Int16: 289case SpecialType.System_UInt16: 290case SpecialType.System_Int32: 291case SpecialType.System_UInt32: 292case SpecialType.System_Int64: 293case SpecialType.System_UInt64: 294case SpecialType.System_Single: 295case SpecialType.System_Double: 296case SpecialType.System_Decimal: 297case SpecialType.System_IntPtr when type.IsNativeIntegerType: 298case SpecialType.System_UIntPtr when type.IsNativeIntegerType: 374case SpecialType.System_Object: 375case SpecialType.System_Void: 376case SpecialType.System_Boolean: 377case SpecialType.System_SByte: 378case SpecialType.System_Byte: 379case SpecialType.System_Decimal: 380case SpecialType.System_Single: 381case SpecialType.System_Double: 382case SpecialType.System_Int16: 383case SpecialType.System_Int32: 384case SpecialType.System_Int64: 385case SpecialType.System_Char: 386case SpecialType.System_String: 387case SpecialType.System_UInt16: 388case SpecialType.System_UInt32: 389case SpecialType.System_UInt64: 390case SpecialType.System_IntPtr when symbol.IsNativeIntegerType: 391case SpecialType.System_UIntPtr when symbol.IsNativeIntegerType: 402typeSymbol.AllInterfaces.Any(static i => i.SpecialType == SpecialType.System_Collections_IEnumerable) && 651case SpecialType.System_Boolean: 652case SpecialType.System_Char: 653case SpecialType.System_SByte: 654case SpecialType.System_Byte: 655case SpecialType.System_Int16: 656case SpecialType.System_UInt16: 657case SpecialType.System_Int32: 658case SpecialType.System_UInt32: 659case SpecialType.System_Int64: 660case SpecialType.System_UInt64: 661case SpecialType.System_Decimal: 662case SpecialType.System_Single: 663case SpecialType.System_Double: 666case SpecialType.System_IntPtr: 667case SpecialType.System_UIntPtr: 670case SpecialType.System_DateTime: 759namedType.OriginalDefinition.GetAttributes().Any(static a => a.AttributeClass?.SpecialType == SpecialType.System_Runtime_CompilerServices_InlineArrayAttribute);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\PredefinedTypeExtensions.cs (41)
13public static SpecialType ToSpecialType(this PredefinedType predefinedType) 16PredefinedType.Object => SpecialType.System_Object, 17PredefinedType.Void => SpecialType.System_Void, 18PredefinedType.Boolean => SpecialType.System_Boolean, 19PredefinedType.Char => SpecialType.System_Char, 20PredefinedType.SByte => SpecialType.System_SByte, 21PredefinedType.Byte => SpecialType.System_Byte, 22PredefinedType.Int16 => SpecialType.System_Int16, 23PredefinedType.UInt16 => SpecialType.System_UInt16, 24PredefinedType.Int32 => SpecialType.System_Int32, 25PredefinedType.UInt32 => SpecialType.System_UInt32, 26PredefinedType.Int64 => SpecialType.System_Int64, 27PredefinedType.UInt64 => SpecialType.System_UInt64, 28PredefinedType.Decimal => SpecialType.System_Decimal, 29PredefinedType.Single => SpecialType.System_Single, 30PredefinedType.Double => SpecialType.System_Double, 31PredefinedType.String => SpecialType.System_String, 32PredefinedType.DateTime => SpecialType.System_DateTime, 33PredefinedType.IntPtr => SpecialType.System_IntPtr, 34PredefinedType.UIntPtr => SpecialType.System_UIntPtr, 35_ => SpecialType.None, 38public static PredefinedType ToPredefinedType(this SpecialType specialType) 41SpecialType.System_Object => PredefinedType.Object, 42SpecialType.System_Void => PredefinedType.Void, 43SpecialType.System_Boolean => PredefinedType.Boolean, 44SpecialType.System_Char => PredefinedType.Char, 45SpecialType.System_SByte => PredefinedType.SByte, 46SpecialType.System_Byte => PredefinedType.Byte, 47SpecialType.System_Int16 => PredefinedType.Int16, 48SpecialType.System_UInt16 => PredefinedType.UInt16, 49SpecialType.System_Int32 => PredefinedType.Int32, 50SpecialType.System_UInt32 => PredefinedType.UInt32, 51SpecialType.System_Int64 => PredefinedType.Int64, 52SpecialType.System_UInt64 => PredefinedType.UInt64, 53SpecialType.System_Decimal => PredefinedType.Decimal, 54SpecialType.System_Single => PredefinedType.Single, 55SpecialType.System_Double => PredefinedType.Double, 56SpecialType.System_String => PredefinedType.String, 57SpecialType.System_DateTime => PredefinedType.DateTime, 58SpecialType.System_IntPtr => PredefinedType.IntPtr, 59SpecialType.System_UIntPtr => PredefinedType.UIntPtr,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.cs (1)
198=> symbol.IsKind(SymbolKind.NamedType, out ITypeSymbol? typeSymbol) && typeSymbol.SpecialType == SpecialType.System_Object;
Text.Analyzers (443)
src\Compilers\Core\Portable\SpecialTypeExtensions.cs (154)
17public static bool IsClrInteger(this SpecialType specialType) 21case SpecialType.System_Boolean: 22case SpecialType.System_Char: 23case SpecialType.System_Byte: 24case SpecialType.System_SByte: 25case SpecialType.System_Int16: 26case SpecialType.System_UInt16: 27case SpecialType.System_Int32: 28case SpecialType.System_UInt32: 29case SpecialType.System_Int64: 30case SpecialType.System_UInt64: 31case SpecialType.System_IntPtr: 32case SpecialType.System_UIntPtr: 42public static bool IsBlittable(this SpecialType specialType) 46case SpecialType.System_Boolean: 47case SpecialType.System_Char: 48case SpecialType.System_Byte: 49case SpecialType.System_SByte: 50case SpecialType.System_Int16: 51case SpecialType.System_UInt16: 52case SpecialType.System_Int32: 53case SpecialType.System_UInt32: 54case SpecialType.System_Int64: 55case SpecialType.System_UInt64: 56case SpecialType.System_Single: 57case SpecialType.System_Double: 64public static bool IsValueType(this SpecialType specialType) 68case SpecialType.System_Void: 69case SpecialType.System_Boolean: 70case SpecialType.System_Char: 71case SpecialType.System_Byte: 72case SpecialType.System_SByte: 73case SpecialType.System_Int16: 74case SpecialType.System_UInt16: 75case SpecialType.System_Int32: 76case SpecialType.System_UInt32: 77case SpecialType.System_Int64: 78case SpecialType.System_UInt64: 79case SpecialType.System_Single: 80case SpecialType.System_Double: 81case SpecialType.System_Decimal: 82case SpecialType.System_IntPtr: 83case SpecialType.System_UIntPtr: 84case SpecialType.System_Nullable_T: 85case SpecialType.System_DateTime: 86case SpecialType.System_TypedReference: 87case SpecialType.System_ArgIterator: 88case SpecialType.System_RuntimeArgumentHandle: 89case SpecialType.System_RuntimeFieldHandle: 90case SpecialType.System_RuntimeMethodHandle: 91case SpecialType.System_RuntimeTypeHandle: 98public static int SizeInBytes(this SpecialType specialType) 102case SpecialType.System_SByte: 104case SpecialType.System_Byte: 106case SpecialType.System_Int16: 108case SpecialType.System_UInt16: 110case SpecialType.System_Int32: 112case SpecialType.System_UInt32: 114case SpecialType.System_Int64: 116case SpecialType.System_UInt64: 118case SpecialType.System_Char: 120case SpecialType.System_Single: 122case SpecialType.System_Double: 124case SpecialType.System_Boolean: 127case SpecialType.System_Decimal: 141public static bool IsPrimitiveRecursiveStruct(this SpecialType specialType) 145case SpecialType.System_Boolean: 146case SpecialType.System_Byte: 147case SpecialType.System_Char: 148case SpecialType.System_Double: 149case SpecialType.System_Int16: 150case SpecialType.System_Int32: 151case SpecialType.System_Int64: 152case SpecialType.System_UInt16: 153case SpecialType.System_UInt32: 154case SpecialType.System_UInt64: 155case SpecialType.System_IntPtr: 156case SpecialType.System_UIntPtr: 157case SpecialType.System_SByte: 158case SpecialType.System_Single: 165public static bool IsValidEnumUnderlyingType(this SpecialType specialType) 169case SpecialType.System_Byte: 170case SpecialType.System_SByte: 171case SpecialType.System_Int16: 172case SpecialType.System_UInt16: 173case SpecialType.System_Int32: 174case SpecialType.System_UInt32: 175case SpecialType.System_Int64: 176case SpecialType.System_UInt64: 183public static bool IsNumericType(this SpecialType specialType) 187case SpecialType.System_Byte: 188case SpecialType.System_SByte: 189case SpecialType.System_Int16: 190case SpecialType.System_UInt16: 191case SpecialType.System_Int32: 192case SpecialType.System_UInt32: 193case SpecialType.System_Int64: 194case SpecialType.System_UInt64: 195case SpecialType.System_Single: 196case SpecialType.System_Double: 197case SpecialType.System_Decimal: 207public static bool IsIntegralType(this SpecialType specialType) 211case SpecialType.System_Byte: 212case SpecialType.System_SByte: 213case SpecialType.System_Int16: 214case SpecialType.System_UInt16: 215case SpecialType.System_Int32: 216case SpecialType.System_UInt32: 217case SpecialType.System_Int64: 218case SpecialType.System_UInt64: 225public static bool IsUnsignedIntegralType(this SpecialType specialType) 229case SpecialType.System_Byte: 230case SpecialType.System_UInt16: 231case SpecialType.System_UInt32: 232case SpecialType.System_UInt64: 239public static bool IsSignedIntegralType(this SpecialType specialType) 243case SpecialType.System_SByte: 244case SpecialType.System_Int16: 245case SpecialType.System_Int32: 246case SpecialType.System_Int64: 258public static int VBForToShiftBits(this SpecialType specialType) 262case SpecialType.System_SByte: 264case SpecialType.System_Int16: 266case SpecialType.System_Int32: 268case SpecialType.System_Int64: 275public static SpecialType FromRuntimeTypeOfLiteralValue(object value) 282return SpecialType.System_Int32; 287return SpecialType.System_String; 292return SpecialType.System_Boolean; 297return SpecialType.System_Char; 302return SpecialType.System_Int64; 307return SpecialType.System_Double; 312return SpecialType.System_UInt32; 317return SpecialType.System_UInt64; 322return SpecialType.System_Single; 327return SpecialType.System_Decimal; 332return SpecialType.System_Int16; 337return SpecialType.System_UInt16; 342return SpecialType.System_DateTime; 347return SpecialType.System_Byte; 352return SpecialType.System_SByte; 355return SpecialType.None; 365public static bool CanOptimizeBehavior(this SpecialType specialType) 366=> specialType is >= SpecialType.System_Object and <= SpecialType.System_Runtime_CompilerServices_InlineArrayAttribute; 371internal static ulong ConvertUnderlyingValueToUInt64(this SpecialType enumUnderlyingType, object value) 379SpecialType.System_SByte => (ulong)(sbyte)value, 380SpecialType.System_Int16 => (ulong)(short)value, 381SpecialType.System_Int32 => (ulong)(int)value, 382SpecialType.System_Int64 => (ulong)(long)value, 383SpecialType.System_Byte => (byte)value, 384SpecialType.System_UInt16 => (ushort)value, 385SpecialType.System_UInt32 => (uint)value, 386SpecialType.System_UInt64 => (ulong)value,
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (19)
340(binaryOperation.Type.SpecialType == SpecialType.System_Boolean && 374SpecialType.System_Boolean 375or SpecialType.System_Byte 376or SpecialType.System_Char 377or SpecialType.System_Double 378or SpecialType.System_Int16 379or SpecialType.System_Int32 380or SpecialType.System_Int64 381or SpecialType.System_UInt16 382or SpecialType.System_UInt32 383or SpecialType.System_UInt64 384or SpecialType.System_IntPtr 385or SpecialType.System_UIntPtr 386or SpecialType.System_SByte 387or SpecialType.System_Single 388or SpecialType.System_String 389or SpecialType.System_Object 390or SpecialType.System_ValueType 391or SpecialType.System_Void => true,
src\RoslynAnalyzers\Utilities\Compiler\DiagnosticHelpers.cs (11)
11public static bool TryConvertToUInt64(object? value, SpecialType specialType, out ulong convertedValue) 19case SpecialType.System_Int16: 23case SpecialType.System_Int32: 27case SpecialType.System_Int64: 31case SpecialType.System_UInt16: 35case SpecialType.System_UInt32: 39case SpecialType.System_UInt64: 43case SpecialType.System_Byte: 47case SpecialType.System_SByte: 51case SpecialType.System_Char: 55case SpecialType.System_Boolean:
src\RoslynAnalyzers\Utilities\Compiler\DoNotCatchGeneralUnlessRethrown.cs (1)
104compilation.GetSpecialType(SpecialType.System_Object),
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IMethodSymbolExtensions.cs (16)
31method.ReturnType.SpecialType == SpecialType.System_Boolean && 33method.Parameters[0].Type.SpecialType == SpecialType.System_Object && 43method.ContainingType.SpecialType == SpecialType.System_Object && 46method.ReturnType.SpecialType == SpecialType.System_Boolean && 48method.Parameters[0].Type.SpecialType == SpecialType.System_Object; 58method.ContainingType.SpecialType == SpecialType.System_Object && 60method.ReturnType.SpecialType == SpecialType.System_Boolean && 61method.Parameters[0].Type.SpecialType == SpecialType.System_Object && 62method.Parameters[1].Type.SpecialType == SpecialType.System_Object && 74if (overriddenMethod.ContainingType.SpecialType == SpecialType.System_Object) 189parameter.Type.SpecialType == SpecialType.System_Boolean && 238method.Parameters[0].Type.SpecialType == SpecialType.System_Boolean; 407method.Parameters[0].Type.SpecialType == SpecialType.System_Boolean && 421method.Parameters[1].Type.SpecialType == SpecialType.System_Boolean && 500method.Parameters[0].Type.SpecialType == SpecialType.System_Object; 540method.ReturnType.SpecialType == SpecialType.System_Boolean &&
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ITypeSymbolExtensions.cs (16)
22SpecialType.System_Boolean 23or SpecialType.System_Byte 24or SpecialType.System_Char 25or SpecialType.System_Double 26or SpecialType.System_Int16 27or SpecialType.System_Int32 28or SpecialType.System_Int64 29or SpecialType.System_UInt16 30or SpecialType.System_UInt32 31or SpecialType.System_UInt64 32or SpecialType.System_SByte 33or SpecialType.System_Single 34or SpecialType.System_String => true, 251=> typeSymbol.IsValueType || typeSymbol.SpecialType == SpecialType.System_String; 259=> typeSymbol != null && typeSymbol.IsValueType && typeSymbol.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T; 265=> typeSymbol.IsNullableValueType() && ((INamedTypeSymbol)typeSymbol).TypeArguments[0].SpecialType == SpecialType.System_Boolean;
src\RoslynAnalyzers\Utilities\Workspaces\SyntaxGeneratorExtensions.cs (4)
330generator.TypeExpression(SpecialType.System_Boolean), 386generator.ParameterDeclaration(argumentName.ToString(), generator.TypeExpression(SpecialType.System_Object)) 388returnType: generator.TypeExpression(SpecialType.System_Boolean), 409returnType: generator.TypeExpression(SpecialType.System_Int32),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (2)
157type.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T || 174if (type.SpecialType == SpecialType.System_String)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SemanticFacts\ISemanticFactsExtensions.cs (2)
119=> type?.SpecialType is SpecialType.System_Single or SpecialType.System_Double;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Simplification\SpecialTypeAnnotation.cs (8)
14private static readonly ConcurrentDictionary<SpecialType, string> s_fromSpecialTypes = new(); 15private static readonly ConcurrentDictionary<string, SpecialType> s_toSpecialTypes = new(); 17public static SyntaxAnnotation Create(SpecialType specialType) 20public static SpecialType GetSpecialType(SyntaxAnnotation annotation) 23private static string CreateFromSpecialTypes(SpecialType arg) 26private static SpecialType CreateToSpecialTypes(string arg) 27=> (SpecialType)Enum.Parse(typeof(SpecialType), arg);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.NamedTypeSymbolKey.cs (1)
26visitor.WriteBoolean(symbol.SpecialType == SpecialType.System_IntPtr);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (6)
758&& symbol.ContainingType.SpecialType == SpecialType.System_Object 1017if (newReceiverType.SpecialType != SpecialType.None) 1024return newSymbolContainingType.SpecialType is SpecialType.System_Array or 1025SpecialType.System_Delegate or 1026SpecialType.System_Enum or 1027SpecialType.System_String;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (9)
58private static object CreateOne(SpecialType specialType) 61SpecialType.System_SByte => (sbyte)1, 62SpecialType.System_Byte => (byte)1, 63SpecialType.System_Int16 => (short)1, 64SpecialType.System_UInt16 => (ushort)1, 65SpecialType.System_Int32 => 1, 66SpecialType.System_UInt32 => (uint)1, 67SpecialType.System_Int64 => (long)1, 68SpecialType.System_UInt64 => (ulong)1,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IntegerUtilities.cs (7)
60public static long Convert(long v, SpecialType type) 63SpecialType.System_SByte => unchecked((sbyte)v), 64SpecialType.System_Byte => unchecked((byte)v), 65SpecialType.System_Int16 => unchecked((short)v), 66SpecialType.System_UInt16 => unchecked((ushort)v), 67SpecialType.System_Int32 => unchecked((int)v), 68SpecialType.System_UInt32 => unchecked((uint)v),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\IMethodSymbolExtensions.cs (2)
46method.Parameters is [{ Type.SpecialType: SpecialType.System_Object }, var secondParam] && 107methodSymbol.ReturnType.SpecialType == SpecialType.System_Int32 ||
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (1)
664ContainingType.SpecialType: SpecialType.System_Object,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (4)
512.Select(p => (p.Type ?? compilation.GetSpecialType(SpecialType.System_Object)).WithNullableAnnotation(p.NullableAnnotation)); 517types = types.Concat((method.ReturnType ?? compilation.GetSpecialType(SpecialType.System_Object)).WithNullableAnnotation(method.ReturnNullableAnnotation)); 680if (!returnType.GetMembers().OfType<IPropertySymbol>().Any(p => p.Name == WellKnownMemberNames.IsCompleted && p.Type.SpecialType == SpecialType.System_Boolean && p.GetMethod != null)) 730ReturnType.SpecialType: SpecialType.System_Boolean,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (56)
55=> symbol?.SpecialType == SpecialType.System_Void; 58=> symbol?.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T; 268case SpecialType.System_Array or SpecialType.System_ValueType: 271case SpecialType.System_Delegate: 272case SpecialType.System_MulticastDelegate: 273case SpecialType.System_Enum: 286case SpecialType.System_Byte: 287case SpecialType.System_SByte: 288case SpecialType.System_Int16: 289case SpecialType.System_UInt16: 290case SpecialType.System_Int32: 291case SpecialType.System_UInt32: 292case SpecialType.System_Int64: 293case SpecialType.System_UInt64: 294case SpecialType.System_Single: 295case SpecialType.System_Double: 296case SpecialType.System_Decimal: 297case SpecialType.System_IntPtr when type.IsNativeIntegerType: 298case SpecialType.System_UIntPtr when type.IsNativeIntegerType: 374case SpecialType.System_Object: 375case SpecialType.System_Void: 376case SpecialType.System_Boolean: 377case SpecialType.System_SByte: 378case SpecialType.System_Byte: 379case SpecialType.System_Decimal: 380case SpecialType.System_Single: 381case SpecialType.System_Double: 382case SpecialType.System_Int16: 383case SpecialType.System_Int32: 384case SpecialType.System_Int64: 385case SpecialType.System_Char: 386case SpecialType.System_String: 387case SpecialType.System_UInt16: 388case SpecialType.System_UInt32: 389case SpecialType.System_UInt64: 390case SpecialType.System_IntPtr when symbol.IsNativeIntegerType: 391case SpecialType.System_UIntPtr when symbol.IsNativeIntegerType: 402typeSymbol.AllInterfaces.Any(static i => i.SpecialType == SpecialType.System_Collections_IEnumerable) && 651case SpecialType.System_Boolean: 652case SpecialType.System_Char: 653case SpecialType.System_SByte: 654case SpecialType.System_Byte: 655case SpecialType.System_Int16: 656case SpecialType.System_UInt16: 657case SpecialType.System_Int32: 658case SpecialType.System_UInt32: 659case SpecialType.System_Int64: 660case SpecialType.System_UInt64: 661case SpecialType.System_Decimal: 662case SpecialType.System_Single: 663case SpecialType.System_Double: 666case SpecialType.System_IntPtr: 667case SpecialType.System_UIntPtr: 670case SpecialType.System_DateTime: 759namedType.OriginalDefinition.GetAttributes().Any(static a => a.AttributeClass?.SpecialType == SpecialType.System_Runtime_CompilerServices_InlineArrayAttribute);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\PredefinedTypeExtensions.cs (41)
13public static SpecialType ToSpecialType(this PredefinedType predefinedType) 16PredefinedType.Object => SpecialType.System_Object, 17PredefinedType.Void => SpecialType.System_Void, 18PredefinedType.Boolean => SpecialType.System_Boolean, 19PredefinedType.Char => SpecialType.System_Char, 20PredefinedType.SByte => SpecialType.System_SByte, 21PredefinedType.Byte => SpecialType.System_Byte, 22PredefinedType.Int16 => SpecialType.System_Int16, 23PredefinedType.UInt16 => SpecialType.System_UInt16, 24PredefinedType.Int32 => SpecialType.System_Int32, 25PredefinedType.UInt32 => SpecialType.System_UInt32, 26PredefinedType.Int64 => SpecialType.System_Int64, 27PredefinedType.UInt64 => SpecialType.System_UInt64, 28PredefinedType.Decimal => SpecialType.System_Decimal, 29PredefinedType.Single => SpecialType.System_Single, 30PredefinedType.Double => SpecialType.System_Double, 31PredefinedType.String => SpecialType.System_String, 32PredefinedType.DateTime => SpecialType.System_DateTime, 33PredefinedType.IntPtr => SpecialType.System_IntPtr, 34PredefinedType.UIntPtr => SpecialType.System_UIntPtr, 35_ => SpecialType.None, 38public static PredefinedType ToPredefinedType(this SpecialType specialType) 41SpecialType.System_Object => PredefinedType.Object, 42SpecialType.System_Void => PredefinedType.Void, 43SpecialType.System_Boolean => PredefinedType.Boolean, 44SpecialType.System_Char => PredefinedType.Char, 45SpecialType.System_SByte => PredefinedType.SByte, 46SpecialType.System_Byte => PredefinedType.Byte, 47SpecialType.System_Int16 => PredefinedType.Int16, 48SpecialType.System_UInt16 => PredefinedType.UInt16, 49SpecialType.System_Int32 => PredefinedType.Int32, 50SpecialType.System_UInt32 => PredefinedType.UInt32, 51SpecialType.System_Int64 => PredefinedType.Int64, 52SpecialType.System_UInt64 => PredefinedType.UInt64, 53SpecialType.System_Decimal => PredefinedType.Decimal, 54SpecialType.System_Single => PredefinedType.Single, 55SpecialType.System_Double => PredefinedType.Double, 56SpecialType.System_String => PredefinedType.String, 57SpecialType.System_DateTime => PredefinedType.DateTime, 58SpecialType.System_IntPtr => PredefinedType.IntPtr, 59SpecialType.System_UIntPtr => PredefinedType.UIntPtr,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.cs (1)
198=> symbol.IsKind(SymbolKind.NamedType, out ITypeSymbol? typeSymbol) && typeSymbol.SpecialType == SpecialType.System_Object;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractFlagsEnumGenerator.cs (5)
15protected abstract SyntaxNode CreateExplicitlyCastedLiteralValue(INamedTypeSymbol enumType, SpecialType underlyingSpecialType, object constantValue); 78var underlyingSpecialType = enumType.EnumUnderlyingType.SpecialType; 138IFieldSymbol field, INamedTypeSymbol enumType, SpecialType underlyingSpecialType) 172var underlyingSpecialType = enumType.EnumUnderlyingType.SpecialType; 188var underlyingSpecialType = enumType.EnumUnderlyingType.SpecialType;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (12)
83public static bool IsSpecialType([NotNullWhen(true)] ITypeSymbol? type, SpecialType specialType) 136SpecialType.System_SByte => value is sbyte, 137SpecialType.System_Byte => value is byte, 138SpecialType.System_Int16 => value is short, 139SpecialType.System_UInt16 => value is ushort, 140SpecialType.System_Int32 => value is int, 141SpecialType.System_UInt32 => value is uint, 142SpecialType.System_Int64 => value is long, 143SpecialType.System_UInt64 => value is ulong, 144SpecialType.System_Decimal => value is decimal, 145SpecialType.System_Single => value is float, 146SpecialType.System_Double => value is double,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationSymbolFactory.cs (5)
422SpecialType specialType = SpecialType.None, 441SpecialType specialType = SpecialType.None, 493specialType: SpecialType.None,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\LiteralSpecialValues.cs (11)
16public static bool HasSpecialValues(SpecialType specialType) 20case SpecialType.System_SByte: 21case SpecialType.System_Int16: 22case SpecialType.System_UInt16: 23case SpecialType.System_Int32: 24case SpecialType.System_UInt32: 25case SpecialType.System_Int64: 26case SpecialType.System_UInt64: 27case SpecialType.System_Single: 28case SpecialType.System_Double: 29case SpecialType.System_Decimal:
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationAbstractNamedTypeSymbol.cs (1)
29SpecialType specialType,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationArrayTypeSymbol.cs (1)
10internal sealed class CodeGenerationArrayTypeSymbol(ITypeSymbol elementType, int rank, NullableAnnotation nullableAnnotation) : CodeGenerationTypeSymbol(null, null, default, Accessibility.NotApplicable, default, string.Empty, SpecialType.None, nullableAnnotation), IArrayTypeSymbol
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationMethodSymbol.cs (1)
75=> this.ReturnType == null || this.ReturnType.SpecialType == SpecialType.System_Void;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationNamedTypeSymbol.cs (1)
34SpecialType specialType,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationPointerTypeSymbol.cs (1)
9internal sealed class CodeGenerationPointerTypeSymbol(ITypeSymbol pointedAtType) : CodeGenerationTypeSymbol(null, null, default, Accessibility.NotApplicable, default, string.Empty, SpecialType.None, NullableAnnotation.None), IPointerTypeSymbol
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationTypeParameterSymbol.cs (1)
24int ordinal) : CodeGenerationTypeSymbol(containingType?.ContainingAssembly, containingType, attributes, Accessibility.NotApplicable, default, name, SpecialType.None, nullableAnnotation), ITypeParameterSymbol
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationTypeSymbol.cs (2)
19SpecialType specialType, 23public SpecialType SpecialType { get; protected set; } = specialType;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (1)
85_ => compilation.GetSpecialType(SpecialType.System_Object),
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (19)
50returnType: compilation.GetSpecialType(SpecialType.System_Boolean), 55parameters: [CodeGenerationSymbolFactory.CreateParameterSymbol(compilation.GetSpecialType(SpecialType.System_Object).WithNullableAnnotation(NullableAnnotation.Annotated), ObjName)], 411case SpecialType.System_Boolean: 412case SpecialType.System_Char: 413case SpecialType.System_SByte: 414case SpecialType.System_Byte: 415case SpecialType.System_Int16: 416case SpecialType.System_UInt16: 417case SpecialType.System_Int32: 418case SpecialType.System_UInt32: 419case SpecialType.System_Int64: 420case SpecialType.System_UInt64: 421case SpecialType.System_Decimal: 422case SpecialType.System_Single: 423case SpecialType.System_Double: 424case SpecialType.System_String: 425case SpecialType.System_DateTime: 443method.ReturnType.SpecialType == SpecialType.System_Boolean && 444method.Parameters[0].Type.SpecialType == SpecialType.System_Object &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateGetHashCodeMethod.cs (4)
136? factory.SimpleLocalDeclarationStatement(generatorInternal, compilation.GetSpecialType(SpecialType.System_Int32), HashCodeName, CreateLiteralExpression(factory, initHash)) 137: factory.LocalDeclarationStatement(compilation.GetSpecialType(SpecialType.System_Int64), HashCodeName, CreateLiteralExpression(factory, initHash))); 166compilation.GetSpecialType(SpecialType.System_Int32), 210method.ReturnType.SpecialType == SpecialType.System_Int32 &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (12)
60SpecialType? patternValueType, 184else if (operation is IIsTypeOperation { TypeOperand.SpecialType: SpecialType.System_Object } && generatorInternal.SupportsPatterns(semanticModel.SyntaxTree.Options)) 305SpecialType? patternValueType) 307if (patternValueType is SpecialType specialType && specialType.IsNumericType()) 447if (containingType?.SpecialType == SpecialType.System_Array || 448containingType?.SpecialType == SpecialType.System_String) 458case SpecialType.System_Byte: 459case SpecialType.System_UInt16: 460case SpecialType.System_UInt32: 461case SpecialType.System_UInt64: 497SpecialType? patternValueType) 504if (patternValueType == SpecialType.System_Boolean)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.AbstractTypeInferrer.cs (2)
78protected IEnumerable<TypeInferenceInfo> CreateResult(SpecialType type, NullableAnnotation nullableAnnotation = NullableAnnotation.None) 120symbol.ContainingType?.SpecialType == SpecialType.System_Enum;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.cs (1)
46? [semanticModel.Compilation.GetSpecialType(SpecialType.System_Boolean)]
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\SimplificationHelpers.cs (2)
77var specialType = SpecialTypeAnnotation.GetSpecialType(annotation2); 78if (specialType != SpecialType.None)