3 implementations of SpecialType
Microsoft.CodeAnalysis.CSharp (1)
Microsoft.CodeAnalysis.Features (1)
Microsoft.CodeAnalysis.VisualBasic (1)
943 references to SpecialType
ConfigurationSchemaGenerator (15)
ILLink.RoslynAnalyzer (13)
Microsoft.Analyzers.Extra (4)
Microsoft.Analyzers.Local (3)
Microsoft.AspNetCore.App.Analyzers (10)
Microsoft.AspNetCore.Http.RequestDelegateGenerator (24)
Microsoft.AspNetCore.Mvc.Analyzers (3)
Microsoft.AspNetCore.Mvc.Api.Analyzers (5)
Microsoft.CodeAnalysis (29)
Microsoft.CodeAnalysis.CodeStyle (57)
Microsoft.CodeAnalysis.CodeStyle.Fixes (17)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\INamedTypeSymbolExtensions.cs (1)
30namedType.SpecialType,
Microsoft.CodeAnalysis.CSharp (3)
Microsoft.CodeAnalysis.CSharp.CodeStyle (36)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (14)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (8)
Microsoft.CodeAnalysis.CSharp.EndToEnd.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Features (44)
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (164)
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 (21)
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);
3610Assert.Equal(SpecialType.System_Delegate, typeInfo.ConvertedType!.SpecialType);
8031Assert.Equal(SpecialType.System_Delegate, typeInfo.ConvertedType!.SpecialType);
8054Assert.Equal(SpecialType.System_Delegate, typeInfo.ConvertedType!.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\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\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\UnsafeTests.cs (23)
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);
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);
10636Assert.NotEqual(SpecialType.None, type.SpecialType);
10649Assert.Equal(SpecialType.System_Int32, sizeOfSummary.Type.SpecialType);
10655Assert.Equal(s_specialTypeSizeOfMap[type.SpecialType], sizeOfSummary.ConstantValue);
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);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (105)
Compilation\GetSemanticInfoTests.cs (39)
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);
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);
5916Assert.Equal(SpecialType.System_Boolean, model.GetTypeInfo(expr).Type.SpecialType);
Compilation\SemanticModelAPITests.cs (23)
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);
3166Assert.Equal(SpecialType.System_Int32, info.Type.SpecialType);
3201Assert.Equal(SpecialType.System_Int32, info.Type.SpecialType);
3202Assert.Equal(SpecialType.System_Int64, info.ConvertedType.SpecialType);
3916Assert.True(typeInfo0.Type != null && typeInfo0.Type.SpecialType == SpecialType.System_Int16);
4190Assert.Equal(SpecialType.System_String, model.GetTypeInfo(actual[0]).Type.SpecialType);
4215Assert.Equal(SpecialType.System_Int32, model.GetTypeInfo(actual[0]).Type.SpecialType);
4219Assert.Equal(SpecialType.System_Boolean, model.GetTypeInfo(actual[1]).Type.SpecialType);
4280Assert.Equal(SpecialType.System_String, model.GetTypeInfo(actual[0]).Type.SpecialType);
4284Assert.Equal(SpecialType.System_String, model.GetTypeInfo(actual[1]).Type.SpecialType);
4287Assert.Equal(SpecialType.System_String, model.GetTypeInfo(actual[2]).Type.SpecialType);
4291Assert.Equal(SpecialType.System_String, model.GetTypeInfo(actual[3]).Type.SpecialType);
4295Assert.Equal(SpecialType.System_String, model.GetTypeInfo(actual[4]).Type.SpecialType);
4299Assert.Equal(SpecialType.System_String, model.GetTypeInfo(actual[5]).Type.SpecialType);
4303Assert.Equal(SpecialType.System_String, model.GetTypeInfo(actual[6]).Type.SpecialType);
4307Assert.Equal(SpecialType.System_String, model.GetTypeInfo(actual[7]).Type.SpecialType);
4433Assert.Equal(SpecialType.System_Boolean, originalTypeInfo.Type.SpecialType);
4436Assert.Equal(SpecialType.System_Boolean, speculativeTypeInfo.Type.SpecialType);
4504Assert.Equal(SpecialType.System_String, type.TupleElements[0].Type.SpecialType);
4505Assert.Equal(SpecialType.System_Int32, type.TupleElements[1].Type.SpecialType);
Compilation\SemanticModelGetSemanticInfoTests.cs (16)
342Assert.Equal(SpecialType.System_String, semanticInfo.Type.SpecialType);
430Assert.Equal(SpecialType.System_String, semanticInfo.Type.SpecialType);
5356Assert.Equal(SpecialType.System_Int32, semanticInfo.Type.SpecialType);
5381Assert.Equal(SpecialType.System_Int32, semanticInfo.Type.SpecialType);
6090Assert.Equal(SpecialType.System_Void, semanticInfo.Type.SpecialType);
6209Assert.Equal(SpecialType.System_Int32, semanticInfo.Type.SpecialType);
6229Assert.Equal(SpecialType.System_String, ((IArrayTypeSymbol)semanticInfo.Type).ElementType.SpecialType);
6231Assert.Equal(SpecialType.System_Collections_IEnumerable, semanticInfo.ConvertedType.SpecialType);
6251Assert.Equal(SpecialType.System_String, semanticInfo.Type.SpecialType);
6255Assert.Equal(SpecialType.System_String, ((ITypeSymbol)symbol).SpecialType);
8173Assert.Equal(SpecialType.System_Int32, semanticInfo.Type.SpecialType);
8197Assert.Equal(SpecialType.System_Int32, semanticInfo.Type.SpecialType);
8218Assert.Equal(SpecialType.System_Int32, semanticInfo.Type.SpecialType);
8334Assert.Equal(SpecialType.System_Int32, semanticInfo.Type.SpecialType);
9096Assert.Equal(SpecialType.System_Int32, semanticInfo.Type.SpecialType);
10985Assert.Equal(SpecialType.System_Int32, semanticInfo.Type.SpecialType);
Microsoft.CodeAnalysis.CSharp.WinRT.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Workspaces (36)
Microsoft.CodeAnalysis.Features (64)
Microsoft.CodeAnalysis.Test.Utilities (18)
Microsoft.CodeAnalysis.VisualBasic (4)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (11)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (11)
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (1)
Microsoft.CodeAnalysis.VisualBasic.Features (4)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (4)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (29)
Microsoft.CodeAnalysis.Workspaces (61)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\INamedTypeSymbolExtensions.cs (1)
30namedType.SpecialType,
Microsoft.DotNet.CodeAnalysis (2)
Microsoft.Extensions.Logging.Generators (2)
Microsoft.Extensions.Options.SourceGeneration (23)
Microsoft.Gen.Logging (12)
Microsoft.Gen.Logging.Unit.Tests (5)
Microsoft.Gen.Metrics (7)
Microsoft.Gen.MetricsReports (7)
Microsoft.Interop.ComInterfaceGenerator (6)
Microsoft.Interop.JavaScript.JSImportGenerator (15)
Microsoft.Interop.LibraryImportGenerator (4)
Microsoft.Interop.LibraryImportGenerator.Downlevel (1)
Microsoft.Interop.SourceGeneration (20)
Microsoft.Maui.Controls.BindingSourceGen (1)
Microsoft.VisualStudio.LanguageServices (11)
Microsoft.VisualStudio.LanguageServices.CSharp (4)
Microsoft.VisualStudio.LanguageServices.VisualBasic (7)
System.Private.CoreLib.Generators (1)
System.Text.Json.SourceGeneration (8)
System.Text.RegularExpressions.Generator (1)
System.Windows.Forms.Analyzers.CSharp (1)
System.Windows.Forms.Analyzers.VisualBasic (1)