2 implementations of Type
Microsoft.CodeAnalysis.CSharp (1)
Microsoft.CodeAnalysis.VisualBasic (1)
286 references to Type
Microsoft.CodeAnalysis (11)
Operations\ControlFlowGraphBuilder.cs (10)
3781local.Type,
3999processResource(new LocalReferenceOperation(localSymbol, isDeclaration: false, semanticModel: null, declarator.Syntax, localSymbol.Type,
4288lockStatement.LockTakenSymbol.Type, constantValue: null, isImplicit: true);
4329lockStatement.LockTakenSymbol.Type, constantValue: null, isImplicit: true);
4564current = applyConversion(info?.ElementConversion, current, local.Type);
4571local.Type,
4688operation.LoopControlVariable.Syntax, loopObject.Type,
5335declarator.Syntax, local.Type, constantValue: null, isImplicit: true);
5762type: localSymbol.Type,
5779var localRef = new LocalReferenceOperation(localSymbol, isDeclaration: true, semanticModel: null, declarator.Syntax, localSymbol.Type, constantValue: null, isImplicit: true);
Microsoft.CodeAnalysis.CodeStyle (7)
Microsoft.CodeAnalysis.CodeStyle.Fixes (4)
Microsoft.CodeAnalysis.CSharp (4)
Microsoft.CodeAnalysis.CSharp.CodeStyle (7)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (4)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (4)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (20)
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (21)
Semantics\PatternMatchingTests_ListPatterns.cs (11)
3334Assert.Equal(expectedType, local.Type.ToTestDisplayString(includeNonNullable: true));
3341Assert.Equal(expectedType, local.Type.ToTestDisplayString(includeNonNullable: true));
3649Assert.Equal(declaredType, ((ILocalSymbol)symbol).Type.ToDisplayString());
3729Assert.Equal("System.Int32", ((ILocalSymbol)symbol).Type.ToTestDisplayString());
3744Assert.Equal("System.Int32", ((ILocalSymbol)symbol).Type.ToTestDisplayString());
4100Assert.Equal(expectedType, local.Type.ToTestDisplayString(includeNonNullable: true));
4187Assert.Equal(expectedType, local.Type.ToTestDisplayString(includeNonNullable: true));
4264Assert.Equal(expectedType, local.Type.ToTestDisplayString(includeNonNullable: true));
4379Assert.Equal(expectedType, local.Type.ToTestDisplayString(includeNonNullable: true));
4420Assert.Equal(declaredType, ((ILocalSymbol)symbol).Type.ToDisplayString());
4571Assert.Equal(expectedType, local.Type.ToTestDisplayString(includeNonNullable: true));
Microsoft.CodeAnalysis.CSharp.Features (16)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (89)
Semantics\NullableReferenceTypesTests.cs (20)
5162Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, local.Type.NullableAnnotation);
5163Assert.Equal("T?", local.Type.ToTestDisplayString(includeNonNullable: true));
67844Assert.Equal(CodeAnalysis.NullableAnnotation.NotAnnotated, symbol.GetPublicSymbol().Type.NullableAnnotation);
141091Assert.Equal("System.Object?", local.Type.ToTestDisplayString());
141093Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, local.Type.NullableAnnotation);
141132Assert.Equal("System.Object?", local.Type.ToTestDisplayString());
141134Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, local.Type.NullableAnnotation);
141172Assert.Equal("System.Object?", local.Type.ToTestDisplayString());
141174Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, local.Type.NullableAnnotation);
141210Assert.Equal("System.Object?", local.Type.ToTestDisplayString());
141212Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, local.Type.NullableAnnotation);
141248Assert.Equal("System.Object?", local.Type.ToTestDisplayString());
141250Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, local.Type.NullableAnnotation);
141352Assert.Equal("System.Object?", local.Type.ToTestDisplayString());
141354Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, local.Type.NullableAnnotation);
141391Assert.Equal("System.Object?", local.Type.ToTestDisplayString());
141393Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, local.Type.NullableAnnotation);
150523symbol.Type.NullableAnnotation);
154411Assert.Equal("T?", local.Type.ToTestDisplayString());
154412Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, local.Type.NullableAnnotation);
Semantics\OutVarTests.cs (34)
987AssertInfoForDeclarationExpressionSyntax(model, decl, expectedSymbol: local, expectedType: local.Type);
994Assert.Equal(local.Type, model.GetTypeInfo(reference).Type);
1150AssertInfoForDeclarationExpressionSyntax(model, decl, local, local.Type);
5756Assert.Equal("System.Int32", ((ILocalSymbol)compilation.GetSemanticModel(tree).GetDeclaredSymbol(GetVariableDesignation(x1Decl))).Type.ToTestDisplayString());
12875Assert.Equal("System.Int32", ((ILocalSymbol)compilation.GetSemanticModel(tree).GetDeclaredSymbol(GetVariableDesignation(yDecl))).Type.ToTestDisplayString());
18036Assert.Equal("Cls.var", ((ILocalSymbol)model.GetDeclaredSymbol(GetVariableDesignation(x1Decl))).Type.ToTestDisplayString());
18436Assert.Equal("System.Int32", ((ILocalSymbol)compilation.GetSemanticModel(tree).GetDeclaredSymbol(GetVariableDesignation(x1Decl))).Type.ToTestDisplayString());
18500Assert.Equal("System.Int32", ((ILocalSymbol)compilation.GetSemanticModel(tree).GetDeclaredSymbol(GetVariableDesignation(x1Decl))).Type.ToTestDisplayString());
18549Assert.Equal("System.Int32", ((ILocalSymbol)compilation.GetSemanticModel(tree).GetDeclaredSymbol(GetVariableDesignation(x1Decl))).Type.ToTestDisplayString());
18594Assert.Equal("System.Int32", ((ILocalSymbol)compilation.GetSemanticModel(tree).GetDeclaredSymbol(GetVariableDesignation(x1Decl))).Type.ToTestDisplayString());
20214Assert.True(x1.Type.IsErrorType());
20243Assert.Equal("System.Int32", x1.Type.ToTestDisplayString());
21299Assert.True(((ILocalSymbol)y1).Type.IsErrorType());
21359Assert.True(symbol.Type.IsErrorType());
33563Assert.Equal("System.Int32", symbol.Type.ToTestDisplayString());
33649Assert.Equal("System.Int32", symbol.Type.ToTestDisplayString());
34705Assert.Equal("System.Int32", symbol.Type.ToTestDisplayString());
34786Assert.Equal("System.Int32", symbol.Type.ToTestDisplayString());
34838Assert.Equal("System.Int32", symbol.Type.ToTestDisplayString());
34892Assert.Equal("System.Int32", symbol.Type.ToTestDisplayString());
34950Assert.Equal("System.Int32", symbol.Type.ToTestDisplayString());
35001Assert.Equal("System.Int32", symbol.Type.ToTestDisplayString());
35054Assert.Equal("System.Int32", symbol.Type.ToTestDisplayString());
35093Assert.Equal("System.Int32", symbol.Type.ToTestDisplayString());
35127Assert.Equal("var", symbol.Type.ToTestDisplayString());
35166Assert.Equal("var", symbol.Type.ToTestDisplayString());
35210Assert.Equal("var", symbol.Type.ToTestDisplayString());
35241Assert.Equal("var", symbol.Type.ToTestDisplayString());
35280Assert.Equal("var", symbol.Type.ToTestDisplayString());
35313Assert.Equal("var", symbol.Type.ToTestDisplayString());
35349Assert.Equal("var", symbol.Type.ToTestDisplayString());
35388Assert.Equal("var", symbol.Type.ToTestDisplayString());
35418Assert.Equal("var", symbol.Type.ToTestDisplayString());
35455Assert.Equal("var", symbol.Type.ToTestDisplayString());
Semantics\UsingStatementTests.cs (9)
67Assert.Equal(SpecialType.System_IDisposable, declaredLocal.Type.SpecialType);
1347Assert.Equal(((ILocalSymbol)declaredSymbol).Type, typeInfo.Symbol);
1388Assert.Equal(((ILocalSymbol)model.GetDeclaredSymbol(usingStatement.Declaration.Variables.First())).Type, typeInfo.Symbol);
1524VerifySymbolInfoForUsingStatements(compilation, x.Type);
1555VerifySymbolInfoForUsingStatements(compilation, x.Type, 2);
1584VerifySymbolInfoForUsingStatements(compilation, x.Type, 1);
1612VerifySymbolInfoForUsingStatements(compilation, x.Type, 1);
1641VerifySymbolInfoForUsingStatements(compilation, x.Type, 1);
1669VerifySymbolInfoForUsingStatements(compilation, x.Type, 1);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (43)
Symbols\Source\NullablePublicAPITests.cs (22)
1004var result = localSymbol.Type.NullableAnnotation;
1176Assert.Equal(declaredSymbol.Type.NullableAnnotation, declaredSymbol.NullableAnnotation);
1951Assert.Equal(PublicNullableAnnotation.Annotated, symbol.Type.NullableAnnotation);
1998Assert.Equal(expectedAnnotation, symbol.Type.NullableAnnotation);
2059Assert.Equal(expectedAnnotation1, symbols[0].Type.NullableAnnotation);
2061Assert.Equal(expectedAnnotation2, symbols[1].Type.NullableAnnotation);
2102Assert.Equal(expectedAnnotation1, symbols[0].Type.NullableAnnotation);
2104Assert.Equal(expectedAnnotation2, symbols[1].Type.NullableAnnotation);
2141Assert.Equal(PublicNullableAnnotation.Annotated, ((ILocalSymbol)specModel.GetDeclaredSymbol(newDeclarator)).Type.NullableAnnotation);
2145Assert.Equal(PublicNullableAnnotation.Annotated, ((ILocalSymbol)specModel.GetDeclaredSymbol(newDeclarator)).Type.NullableAnnotation);
2190Assert.Equal(expectedAnnotation, symbol.Type.NullableAnnotation);
2222Assert.Equal(PublicNullableAnnotation.Annotated, symbol.Type.NullableAnnotation);
2260Assert.Equal(expectedAnnotation, symbol.Type.NullableAnnotation);
2292Assert.Equal(expectedAnnotation, symbol.Type.NullableAnnotation);
2338Assert.Equal(expectedAnnotation, symbol.Type.NullableAnnotation);
2380Assert.Equal(expectedAnnotation, symbol.Type.NullableAnnotation);
2423Assert.Equal(expectedAnnotation, symbol.Type.NullableAnnotation);
2465Assert.Equal(PublicNullableAnnotation.Annotated, symbol.Type.NullableAnnotation);
2513Assert.Equal(expectedAnnotation, symbol.Type.NullableAnnotation);
2562Assert.Equal(expectedAnnotation, symbol.Type.NullableAnnotation);
3924Assert.Equal(PublicNullableAnnotation.Annotated, o2Symbol.Type.NullableAnnotation);
3938Assert.Equal(PublicNullableAnnotation.Annotated, o4Symbol.Type.NullableAnnotation);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
Microsoft.CodeAnalysis.CSharp.Workspaces (4)
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (1)
Microsoft.CodeAnalysis.Features (15)
LanguageServices\AnonymousTypeDisplayService\AbstractStructuralTypeDisplayService.StructuralTypeCollectorVisitor.cs (1)
48=> symbol.Type.Accept(this);
Microsoft.CodeAnalysis.Test.Utilities (5)
Diagnostics\CouldHaveMoreSpecificTypeAnalyzer.cs (4)
108AssignTo(local, local.Type, localsSourceTypes, initializer.Value);
114AssignTo(local, local.Type, localsSourceTypes, initializer.Value);
126if (HasMoreSpecificSourceType(local, local.Type, localsSourceTypes, out var mostSpecificSourceType))
243AssignTo(targetLocal, targetLocal.Type, localsSourceTypes, sourceType);
Microsoft.CodeAnalysis.VisualBasic (3)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (1)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (1)
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures.UnitTests (6)
SymbolId\SymbolKeyMetadataVsSourceTests.vb (4)
250ResolveAndVerifySymbol(localSymbols(0).Type, typeA, comp20, SymbolIdComparison.IgnoreCase)
252ResolveAndVerifySymbol(localSymbols(1).Type, DirectCast(ver20Symbols(0), IParameterSymbol).Type, comp20, SymbolIdComparison.IgnoreCase)
254ResolveAndVerifySymbol(localSymbols(2).Type, DirectCast(ver20Symbols(4), IParameterSymbol).Type, comp20, SymbolIdComparison.IgnoreCase)
256ResolveAndVerifySymbol(localSymbols(3).Type, DirectCast(ver20Symbols(1), IMethodSymbol).ReturnType, comp20, SymbolIdComparison.IgnoreCase)
Microsoft.CodeAnalysis.VisualBasic.Features (4)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (2)
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (1)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (4)
Microsoft.CodeAnalysis.Workspaces (5)
Microsoft.VisualStudio.LanguageServices.CSharp (1)
Microsoft.VisualStudio.LanguageServices.VisualBasic (2)