2 implementations of Type
Microsoft.CodeAnalysis.CSharp (1)
Microsoft.CodeAnalysis.VisualBasic (1)
357 references to Type
ConfigurationSchemaGenerator (1)
Metrics (7)
Metrics.Legacy (7)
Microsoft.AspNetCore.App.CodeFixes (2)
Microsoft.CodeAnalysis (11)
Operations\ControlFlowGraphBuilder.cs (10)
3798local.Type,
4019processResource(new LocalReferenceOperation(localSymbol, isDeclaration: false, semanticModel: null, declarator.Syntax, localSymbol.Type,
4369lockStatement.LockTakenSymbol.Type, constantValue: null, isImplicit: true);
4410lockStatement.LockTakenSymbol.Type, constantValue: null, isImplicit: true);
4661current = applyConversion(info?.ElementConversion, current, local.Type);
4668local.Type,
4785operation.LoopControlVariable.Syntax, loopObject.Type,
5432declarator.Syntax, local.Type, constantValue: null, isImplicit: true);
5859type: localSymbol.Type,
5876var localRef = new LocalReferenceOperation(localSymbol, isDeclaration: true, semanticModel: null, declarator.Syntax, localSymbol.Type, constantValue: null, isImplicit: true);
Microsoft.CodeAnalysis.Analyzers (7)
Microsoft.CodeAnalysis.AnalyzerUtilities (9)
Microsoft.CodeAnalysis.BannedApiAnalyzers (7)
Microsoft.CodeAnalysis.CodeStyle (8)
Microsoft.CodeAnalysis.CodeStyle.Fixes (4)
Microsoft.CodeAnalysis.CSharp (4)
Microsoft.CodeAnalysis.CSharp.CodeStyle (8)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (4)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (4)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (20)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (58)
Semantics\OutVarTests.cs (34)
985AssertInfoForDeclarationExpressionSyntax(model, decl, expectedSymbol: local, expectedType: local.Type);
992Assert.Equal(local.Type, model.GetTypeInfo(reference).Type);
1148AssertInfoForDeclarationExpressionSyntax(model, decl, local, local.Type);
5754Assert.Equal("System.Int32", ((ILocalSymbol)compilation.GetSemanticModel(tree).GetDeclaredSymbol(GetVariableDesignation(x1Decl))).Type.ToTestDisplayString());
12873Assert.Equal("System.Int32", ((ILocalSymbol)compilation.GetSemanticModel(tree).GetDeclaredSymbol(GetVariableDesignation(yDecl))).Type.ToTestDisplayString());
18034Assert.Equal("Cls.var", ((ILocalSymbol)model.GetDeclaredSymbol(GetVariableDesignation(x1Decl))).Type.ToTestDisplayString());
18434Assert.Equal("System.Int32", ((ILocalSymbol)compilation.GetSemanticModel(tree).GetDeclaredSymbol(GetVariableDesignation(x1Decl))).Type.ToTestDisplayString());
18498Assert.Equal("System.Int32", ((ILocalSymbol)compilation.GetSemanticModel(tree).GetDeclaredSymbol(GetVariableDesignation(x1Decl))).Type.ToTestDisplayString());
18547Assert.Equal("System.Int32", ((ILocalSymbol)compilation.GetSemanticModel(tree).GetDeclaredSymbol(GetVariableDesignation(x1Decl))).Type.ToTestDisplayString());
18592Assert.Equal("System.Int32", ((ILocalSymbol)compilation.GetSemanticModel(tree).GetDeclaredSymbol(GetVariableDesignation(x1Decl))).Type.ToTestDisplayString());
20214Assert.True(x1.Type.IsErrorType());
20243Assert.Equal("System.Int32", x1.Type.ToTestDisplayString());
21302Assert.True(((ILocalSymbol)y1).Type.IsErrorType());
21362Assert.True(symbol.Type.IsErrorType());
33611Assert.Equal("System.Int32", symbol.Type.ToTestDisplayString());
33697Assert.Equal("System.Int32", symbol.Type.ToTestDisplayString());
34753Assert.Equal("System.Int32", symbol.Type.ToTestDisplayString());
34834Assert.Equal("System.Int32", symbol.Type.ToTestDisplayString());
34886Assert.Equal("System.Int32", symbol.Type.ToTestDisplayString());
34940Assert.Equal("System.Int32", symbol.Type.ToTestDisplayString());
34998Assert.Equal("System.Int32", symbol.Type.ToTestDisplayString());
35049Assert.Equal("System.Int32", symbol.Type.ToTestDisplayString());
35102Assert.Equal("System.Int32", symbol.Type.ToTestDisplayString());
35141Assert.Equal("System.Int32", symbol.Type.ToTestDisplayString());
35175Assert.Equal("var", symbol.Type.ToTestDisplayString());
35214Assert.Equal("var", symbol.Type.ToTestDisplayString());
35258Assert.Equal("var", symbol.Type.ToTestDisplayString());
35289Assert.Equal("var", symbol.Type.ToTestDisplayString());
35328Assert.Equal("var", symbol.Type.ToTestDisplayString());
35361Assert.Equal("var", symbol.Type.ToTestDisplayString());
35397Assert.Equal("var", symbol.Type.ToTestDisplayString());
35436Assert.Equal("var", symbol.Type.ToTestDisplayString());
35466Assert.Equal("var", symbol.Type.ToTestDisplayString());
35503Assert.Equal("var", symbol.Type.ToTestDisplayString());
Semantics\PatternMatchingTests_ListPatterns.cs (11)
3395Assert.Equal(expectedType, local.Type.ToTestDisplayString(includeNonNullable: true));
3402Assert.Equal(expectedType, local.Type.ToTestDisplayString(includeNonNullable: true));
3710Assert.Equal(declaredType, ((ILocalSymbol)symbol).Type.ToDisplayString());
3794Assert.Equal("System.Int32", ((ILocalSymbol)symbol).Type.ToTestDisplayString());
3809Assert.Equal("System.Int32", ((ILocalSymbol)symbol).Type.ToTestDisplayString());
4164Assert.Equal(expectedType, local.Type.ToTestDisplayString(includeNonNullable: true));
4251Assert.Equal(expectedType, local.Type.ToTestDisplayString(includeNonNullable: true));
4328Assert.Equal(expectedType, local.Type.ToTestDisplayString(includeNonNullable: true));
4443Assert.Equal(expectedType, local.Type.ToTestDisplayString(includeNonNullable: true));
4484Assert.Equal(declaredType, ((ILocalSymbol)symbol).Type.ToDisplayString());
4635Assert.Equal(expectedType, local.Type.ToTestDisplayString(includeNonNullable: true));
Microsoft.CodeAnalysis.CSharp.Features (17)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (55)
Semantics\NullableReferenceTypesTests.cs (20)
5181Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, local.Type.NullableAnnotation);
5182Assert.Equal("T?", local.Type.ToTestDisplayString(includeNonNullable: true));
71367Assert.Equal(CodeAnalysis.NullableAnnotation.NotAnnotated, symbol.GetPublicSymbol().Type.NullableAnnotation);
145501Assert.Equal("System.Object?", local.Type.ToTestDisplayString());
145503Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, local.Type.NullableAnnotation);
145542Assert.Equal("System.Object?", local.Type.ToTestDisplayString());
145544Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, local.Type.NullableAnnotation);
145582Assert.Equal("System.Object?", local.Type.ToTestDisplayString());
145584Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, local.Type.NullableAnnotation);
145620Assert.Equal("System.Object?", local.Type.ToTestDisplayString());
145622Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, local.Type.NullableAnnotation);
145658Assert.Equal("System.Object?", local.Type.ToTestDisplayString());
145660Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, local.Type.NullableAnnotation);
145762Assert.Equal("System.Object?", local.Type.ToTestDisplayString());
145764Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, local.Type.NullableAnnotation);
145801Assert.Equal("System.Object?", local.Type.ToTestDisplayString());
145803Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, local.Type.NullableAnnotation);
155068symbol.Type.NullableAnnotation);
159002Assert.Equal("T?", local.Type.ToTestDisplayString());
159003Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, local.Type.NullableAnnotation);
Semantics\UsingStatementTests.cs (9)
67Assert.Equal(SpecialType.System_IDisposable, declaredLocal.Type.SpecialType);
1348Assert.Equal(((ILocalSymbol)declaredSymbol).Type, typeInfo.Symbol);
1389Assert.Equal(((ILocalSymbol)model.GetDeclaredSymbol(usingStatement.Declaration.Variables.First())).Type, typeInfo.Symbol);
1525VerifySymbolInfoForUsingStatements(compilation, x.Type);
1556VerifySymbolInfoForUsingStatements(compilation, x.Type, 2);
1585VerifySymbolInfoForUsingStatements(compilation, x.Type, 1);
1613VerifySymbolInfoForUsingStatements(compilation, x.Type, 1);
1642VerifySymbolInfoForUsingStatements(compilation, x.Type, 1);
1670VerifySymbolInfoForUsingStatements(compilation, x.Type, 1);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (43)
Symbols\Source\NullablePublicAPITests.cs (22)
1006var result = localSymbol.Type.NullableAnnotation;
1178Assert.Equal(declaredSymbol.Type.NullableAnnotation, declaredSymbol.NullableAnnotation);
1950Assert.Equal(PublicNullableAnnotation.Annotated, symbol.Type.NullableAnnotation);
1997Assert.Equal(expectedAnnotation, symbol.Type.NullableAnnotation);
2058Assert.Equal(expectedAnnotation1, symbols[0].Type.NullableAnnotation);
2060Assert.Equal(expectedAnnotation2, symbols[1].Type.NullableAnnotation);
2101Assert.Equal(expectedAnnotation1, symbols[0].Type.NullableAnnotation);
2103Assert.Equal(expectedAnnotation2, symbols[1].Type.NullableAnnotation);
2140Assert.Equal(PublicNullableAnnotation.Annotated, ((ILocalSymbol)specModel.GetDeclaredSymbol(newDeclarator)).Type.NullableAnnotation);
2144Assert.Equal(PublicNullableAnnotation.Annotated, ((ILocalSymbol)specModel.GetDeclaredSymbol(newDeclarator)).Type.NullableAnnotation);
2189Assert.Equal(expectedAnnotation, symbol.Type.NullableAnnotation);
2221Assert.Equal(PublicNullableAnnotation.Annotated, symbol.Type.NullableAnnotation);
2259Assert.Equal(expectedAnnotation, symbol.Type.NullableAnnotation);
2291Assert.Equal(expectedAnnotation, symbol.Type.NullableAnnotation);
2337Assert.Equal(expectedAnnotation, symbol.Type.NullableAnnotation);
2379Assert.Equal(expectedAnnotation, symbol.Type.NullableAnnotation);
2422Assert.Equal(expectedAnnotation, symbol.Type.NullableAnnotation);
2464Assert.Equal(PublicNullableAnnotation.Annotated, symbol.Type.NullableAnnotation);
2512Assert.Equal(expectedAnnotation, symbol.Type.NullableAnnotation);
2561Assert.Equal(expectedAnnotation, symbol.Type.NullableAnnotation);
3923Assert.Equal(PublicNullableAnnotation.Annotated, o2Symbol.Type.NullableAnnotation);
3937Assert.Equal(PublicNullableAnnotation.Annotated, o4Symbol.Type.NullableAnnotation);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
Microsoft.CodeAnalysis.CSharp.Workspaces (4)
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (1)
Microsoft.CodeAnalysis.Extensions.Package (2)
Microsoft.CodeAnalysis.Features (14)
LanguageServices\AnonymousTypeDisplayService\AbstractStructuralTypeDisplayService.StructuralTypeCollectorVisitor.cs (1)
45=> symbol.Type.Accept(this);
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (7)
Microsoft.CodeAnalysis.PublicApiAnalyzers (7)
Microsoft.CodeAnalysis.ResxSourceGenerator (7)
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.Workspaces (6)
Microsoft.VisualStudio.LanguageServices.CSharp (1)
Roslyn.Diagnostics.Analyzers (12)
Roslyn.Diagnostics.CSharp.Analyzers (3)
Test.Utilities (1)
Text.Analyzers (7)