1137 references to GetSpecialType
Aspire.Hosting.Analyzers (1)
ConfigurationSchemaGenerator (9)
GenerateDocumentationAndConfigFiles (12)
Metrics (3)
Metrics.Legacy (3)
Microsoft.Analyzers.Extra (1)
Microsoft.Analyzers.Local (1)
Microsoft.AspNetCore.App.Analyzers (3)
Microsoft.AspNetCore.Components.Analyzers (2)
Microsoft.AspNetCore.Components.SdkAnalyzers (2)
Microsoft.AspNetCore.Http.RequestDelegateGenerator (1)
Microsoft.AspNetCore.Mvc.Analyzers (1)
Microsoft.AspNetCore.Mvc.Api.Analyzers (1)
Microsoft.CodeAnalysis (18)
Operations\ControlFlowGraphBuilder.cs (18)
2411INamedTypeSymbol booleanType = _compilation.GetSpecialType(SpecialType.System_Boolean);
2469INamedTypeSymbol booleanType = _compilation.GetSpecialType(SpecialType.System_Boolean);
2570INamedTypeSymbol booleanType = _compilation.GetSpecialType(SpecialType.System_Boolean);
3309return MakeIsNullOperation(operand, _compilation.GetSpecialType(SpecialType.System_Boolean));
3963: _compilation.GetSpecialType(SpecialType.System_IDisposable);
4195return new AwaitOperation(invocation, semanticModel: null, value.Syntax, _compilation.GetSpecialType(SpecialType.System_Void), isImplicit: true);
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);
7740INamedTypeSymbol booleanType = _compilation.GetSpecialType(SpecialType.System_Boolean);
7795? MakeInvalidOperation(operation.Syntax, type: _compilation.GetSpecialType(SpecialType.System_Object), ImmutableArray<IOperation>.Empty)
Microsoft.CodeAnalysis.Analyzers (13)
Microsoft.CodeAnalysis.AnalyzerUtilities (5)
Microsoft.CodeAnalysis.BannedApiAnalyzers (12)
Microsoft.CodeAnalysis.CodeStyle (5)
Microsoft.CodeAnalysis.CodeStyle.Fixes (12)
Microsoft.CodeAnalysis.CSharp (252)
Binder\Binder_Invocation.cs (6)
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 };
2349return new BoundNameOfOperator(node, boundArgument, ConstantValue.Create(name), Compilation.GetSpecialType(SpecialType.System_String));
Binder\Binder_Lookup.cs (2)
1249this.LookupMembersInClass(tmp, this.Compilation.GetSpecialType(SpecialType.System_Object), name, arity, basesBeingResolved, options, originalBinder, type, diagnose, ref useSiteInfo);
2121this.AddMemberLookupSymbolsInfoInClass(result, Compilation.GetSpecialType(SpecialType.System_Object), options, originalBinder, accessThroughType);
Binder\Semantics\Operators\BinaryOperatorOverloadResolution.cs (20)
325operators.Add(new BinaryOperatorSignature(kind | BinaryOperatorKind.Delegate, delegateType, delegateType, Compilation.GetSpecialType(SpecialType.System_Boolean)));
393TypeSymbol systemDelegateType = _binder.Compilation.GetSpecialType(SpecialType.System_Delegate);
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)));
798var @object = Compilation.GetSpecialType(SpecialType.System_Object);
799operators.Add(new BinaryOperatorSignature(kind | BinaryOperatorKind.Object, @object, @object, Compilation.GetSpecialType(SpecialType.System_Boolean)));
Compilation\BuiltInOperators.cs (53)
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;
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),
Lowering\LocalRewriter\LocalRewriter_Literal.cs (10)
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)));
148arguments.Add(new BoundLiteral(syntax, ConstantValue.Create(constantValue.DateTimeValue.Ticks), _compilation.GetSpecialType(SpecialType.System_Int64)));
Symbols\Source\SourceNamedTypeSymbol.cs (4)
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);
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (4)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (96)
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (3)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (33)
Microsoft.CodeAnalysis.CSharp.Features (7)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (48)
Semantics\DelegateTypeTests.cs (6)
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\OperatorTests.cs (17)
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));
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));
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));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (180)
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));
Symbols\TypeTests.cs (22)
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)
Microsoft.CodeAnalysis.CSharp.WinRT.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.Workspaces (3)
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (10)
Microsoft.CodeAnalysis.Extensions.Package (2)
Microsoft.CodeAnalysis.Features (23)
Microsoft.CodeAnalysis.Features.UnitTests (9)
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (12)
Microsoft.CodeAnalysis.PublicApiAnalyzers (3)
Microsoft.CodeAnalysis.ResxSourceGenerator (3)
Microsoft.CodeAnalysis.Test.Utilities (2)
Microsoft.CodeAnalysis.UnitTests (7)
Microsoft.CodeAnalysis.VisualBasic (3)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (4)
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (1)
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (48)
Microsoft.CodeAnalysis.VisualBasic.ExpressionCompiler (5)
Microsoft.CodeAnalysis.VisualBasic.Features (3)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (142)
Compilation\CompilationAPITests.vb (51)
329ntSmb = comp.GetSpecialType(CType(31, 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))
Semantics\Conversions.vb (72)
226Dim objectType = c1.GetSpecialType(System_Object)
227Dim booleanType = c1.GetSpecialType(System_Boolean)
228Dim byteType = c1.GetSpecialType(System_Byte)
229Dim sbyteType = c1.GetSpecialType(System_SByte)
230Dim int16Type = c1.GetSpecialType(System_Int16)
231Dim uint16Type = c1.GetSpecialType(System_UInt16)
232Dim int32Type = c1.GetSpecialType(System_Int32)
233Dim uint32Type = c1.GetSpecialType(System_UInt32)
234Dim int64Type = c1.GetSpecialType(System_Int64)
235Dim uint64Type = c1.GetSpecialType(System_UInt64)
236Dim doubleType = c1.GetSpecialType(System_Double)
237Dim singleType = c1.GetSpecialType(System_Single)
238Dim decimalType = c1.GetSpecialType(System_Decimal)
239Dim dateType = c1.GetSpecialType(System_DateTime)
240Dim stringType = c1.GetSpecialType(System_String)
241Dim charType = c1.GetSpecialType(System_Char)
242Dim intPtrType = c1.GetSpecialType(System_IntPtr)
356Dim nullableType = c1.GetSpecialType(System_Nullable_T)
1078Dim objectType = c1.GetSpecialType(System_Object)
1079Dim booleanType = c1.GetSpecialType(System_Boolean)
1080Dim byteType = c1.GetSpecialType(System_Byte)
1081Dim sbyteType = c1.GetSpecialType(System_SByte)
1082Dim int16Type = c1.GetSpecialType(System_Int16)
1083Dim uint16Type = c1.GetSpecialType(System_UInt16)
1084Dim int32Type = c1.GetSpecialType(System_Int32)
1085Dim uint32Type = c1.GetSpecialType(System_UInt32)
1086Dim int64Type = c1.GetSpecialType(System_Int64)
1087Dim uint64Type = c1.GetSpecialType(System_UInt64)
1088Dim doubleType = c1.GetSpecialType(System_Double)
1089Dim singleType = c1.GetSpecialType(System_Single)
1090Dim decimalType = c1.GetSpecialType(System_Decimal)
1091Dim dateType = c1.GetSpecialType(System_DateTime)
1092Dim stringType = c1.GetSpecialType(System_String)
1093Dim charType = c1.GetSpecialType(System_Char)
1094Dim intPtrType = c1.GetSpecialType(System_IntPtr)
1122Dim nullableType = c1.GetSpecialType(System_Nullable_T)
1485Dim arrayInt32 = c1.CreateArrayTypeSymbol(c1.GetSpecialType(System_Int32))
1494Dim enumerable = c1.GetSpecialType(System_Collections_Generic_IEnumerable_T)
1605Dim [object] = c1.GetSpecialType(System_Object)
1918Dim void = c1.GetSpecialType(System_Void)
1919Dim valueType = c1.GetSpecialType(System_ValueType)
2037Dim nullable = c1.GetSpecialType(System_Nullable_T)
2040c1.GetSpecialType(System_Byte),
2041c1.GetSpecialType(System_SByte),
2042c1.GetSpecialType(System_UInt16),
2043c1.GetSpecialType(System_Int16),
2044c1.GetSpecialType(System_UInt32),
2045c1.GetSpecialType(System_Int32),
2046c1.GetSpecialType(System_UInt64),
2047c1.GetSpecialType(System_Int64),
2048c1.GetSpecialType(System_Decimal),
2049c1.GetSpecialType(System_Single),
2050c1.GetSpecialType(System_Double),
2051c1.GetSpecialType(System_String),
2052c1.GetSpecialType(System_Char),
2053c1.GetSpecialType(System_Boolean),
2054c1.GetSpecialType(System_DateTime),
2055c1.GetSpecialType(System_Object),
2056nullable.Construct(c1.GetSpecialType(System_Byte)),
2057nullable.Construct(c1.GetSpecialType(System_SByte)),
2058nullable.Construct(c1.GetSpecialType(System_UInt16)),
2059nullable.Construct(c1.GetSpecialType(System_Int16)),
2060nullable.Construct(c1.GetSpecialType(System_UInt32)),
2061nullable.Construct(c1.GetSpecialType(System_Int32)),
2062nullable.Construct(c1.GetSpecialType(System_UInt64)),
2063nullable.Construct(c1.GetSpecialType(System_Int64)),
2064nullable.Construct(c1.GetSpecialType(System_Decimal)),
2065nullable.Construct(c1.GetSpecialType(System_Single)),
2066nullable.Construct(c1.GetSpecialType(System_Double)),
2067nullable.Construct(c1.GetSpecialType(System_Char)),
2068nullable.Construct(c1.GetSpecialType(System_Boolean)),
2069nullable.Construct(c1.GetSpecialType(System_DateTime))
Semantics\OverloadResolution.vb (14)
181Dim TestClass2OfInteger = TestClass2.Construct(c1.GetSpecialType(System_Int32))
192Dim intZero As BoundExpression = New BoundLiteral(_syntaxNode, ConstantValue.Create(0I), c1.GetSpecialType(System_Int32))
193Dim longZero As BoundExpression = New BoundLiteral(_syntaxNode, ConstantValue.Create(0L), c1.GetSpecialType(System_Int64))
194Dim unsignedOne As BoundExpression = New BoundLiteral(_syntaxNode, ConstantValue.Create(1UI), c1.GetSpecialType(System_UInt32))
195Dim longConst As BoundExpression = New BoundConversion(_syntaxNode, New BoundLiteral(_syntaxNode, ConstantValue.Null, Nothing), ConversionKind.Widening, True, True, ConstantValue.Create(-1L), c1.GetSpecialType(System_Int64), Nothing)
200Dim doubleConst As BoundExpression = New BoundConversion(_syntaxNode, New BoundLiteral(_syntaxNode, ConstantValue.Null, Nothing), ConversionKind.Widening, True, True, ConstantValue.Create(0.0R), c1.GetSpecialType(System_Double), Nothing)
202Dim shortVal As BoundExpression = New BoundRValuePlaceholder(_syntaxNode, c1.GetSpecialType(System_Int16))
203Dim ushortVal As BoundExpression = New BoundRValuePlaceholder(_syntaxNode, c1.GetSpecialType(System_UInt16))
204Dim objectVal As BoundExpression = New BoundRValuePlaceholder(_syntaxNode, c1.GetSpecialType(System_Object))
210Dim stringVal As BoundExpression = New BoundRValuePlaceholder(_syntaxNode, c1.GetSpecialType(System_String))
2881Dim DoubleMaxValue As BoundExpression = New BoundConversion(_syntaxNode, New BoundLiteral(_syntaxNode, ConstantValue.Null, Nothing), ConversionKind.Widening, True, True, ConstantValue.Create(Double.MaxValue), c1.GetSpecialType(System_Double), Nothing)
2882Dim IntegerMaxValue As BoundExpression = New BoundConversion(_syntaxNode, New BoundLiteral(_syntaxNode, ConstantValue.Null, Nothing), ConversionKind.Widening, True, True, ConstantValue.Create(Integer.MaxValue), c1.GetSpecialType(System_Int32), Nothing)
3072Dim DoubleMaxValue As BoundExpression = New BoundConversion(_syntaxNode, New BoundLiteral(_syntaxNode, ConstantValue.Null, Nothing), ConversionKind.Widening, True, True, ConstantValue.Create(Double.MaxValue), c1.GetSpecialType(System_Double), Nothing)
3073Dim IntegerMaxValue As BoundExpression = New BoundConversion(_syntaxNode, New BoundLiteral(_syntaxNode, ConstantValue.Null, Nothing), ConversionKind.Widening, True, True, ConstantValue.Create(Integer.MaxValue), c1.GetSpecialType(System_Int32), Nothing)
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (11)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (5)
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (11)
Microsoft.CodeAnalysis.Workspaces (13)
Microsoft.CodeAnalysis.Workspaces.UnitTests (12)
Microsoft.Extensions.Logging.Generators (3)
Microsoft.Extensions.Options.SourceGeneration (1)
Microsoft.Extensions.Validation.ValidationsGenerator (1)
Microsoft.Gen.Logging (1)
Microsoft.Gen.Logging.Unit.Tests (4)
Microsoft.Gen.MetadataExtractor (1)
Microsoft.Gen.Metrics (1)
Microsoft.Gen.MetricsReports (1)
Microsoft.Interop.LibraryImportGenerator (7)
Microsoft.Interop.SourceGeneration (2)
Microsoft.VisualStudio.LanguageServices (1)
Microsoft.VisualStudio.LanguageServices.VisualBasic (1)
Mvc.Analyzers.Test (7)
Mvc.Api.Analyzers.Test (2)
Roslyn.Diagnostics.Analyzers (12)
Roslyn.Diagnostics.CSharp.Analyzers (2)
Roslyn.Diagnostics.VisualBasic.Analyzers (4)
System.Text.Json.SourceGeneration (6)
Test.Utilities (3)
Text.Analyzers (12)