2 implementations of Type
Microsoft.CodeAnalysis.CSharp (1)
Microsoft.CodeAnalysis.VisualBasic (1)
295 references to Type
ConfigurationSchemaGenerator (1)
Metrics (1)
Metrics.Legacy (1)
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 (1)
Microsoft.CodeAnalysis.AnalyzerUtilities (3)
Microsoft.CodeAnalysis.BannedApiAnalyzers (1)
Microsoft.CodeAnalysis.CodeStyle (8)
Microsoft.CodeAnalysis.CodeStyle.Fixes (4)
Microsoft.CodeAnalysis.CSharp (4)
Microsoft.CodeAnalysis.CSharp.CodeStyle (6)
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)
986AssertInfoForDeclarationExpressionSyntax(model, decl, expectedSymbol: local, expectedType: local.Type);
993Assert.Equal(local.Type, model.GetTypeInfo(reference).Type);
1149AssertInfoForDeclarationExpressionSyntax(model, decl, local, local.Type);
5755Assert.Equal("System.Int32", ((ILocalSymbol)compilation.GetSemanticModel(tree).GetDeclaredSymbol(GetVariableDesignation(x1Decl))).Type.ToTestDisplayString());
12874Assert.Equal("System.Int32", ((ILocalSymbol)compilation.GetSemanticModel(tree).GetDeclaredSymbol(GetVariableDesignation(yDecl))).Type.ToTestDisplayString());
18035Assert.Equal("Cls.var", ((ILocalSymbol)model.GetDeclaredSymbol(GetVariableDesignation(x1Decl))).Type.ToTestDisplayString());
18435Assert.Equal("System.Int32", ((ILocalSymbol)compilation.GetSemanticModel(tree).GetDeclaredSymbol(GetVariableDesignation(x1Decl))).Type.ToTestDisplayString());
18499Assert.Equal("System.Int32", ((ILocalSymbol)compilation.GetSemanticModel(tree).GetDeclaredSymbol(GetVariableDesignation(x1Decl))).Type.ToTestDisplayString());
18548Assert.Equal("System.Int32", ((ILocalSymbol)compilation.GetSemanticModel(tree).GetDeclaredSymbol(GetVariableDesignation(x1Decl))).Type.ToTestDisplayString());
18593Assert.Equal("System.Int32", ((ILocalSymbol)compilation.GetSemanticModel(tree).GetDeclaredSymbol(GetVariableDesignation(x1Decl))).Type.ToTestDisplayString());
20224Assert.True(x1.Type.IsErrorType());
20253Assert.Equal("System.Int32", x1.Type.ToTestDisplayString());
21312Assert.True(((ILocalSymbol)y1).Type.IsErrorType());
21372Assert.True(symbol.Type.IsErrorType());
33621Assert.Equal("System.Int32", symbol.Type.ToTestDisplayString());
33707Assert.Equal("System.Int32", symbol.Type.ToTestDisplayString());
34763Assert.Equal("System.Int32", symbol.Type.ToTestDisplayString());
34844Assert.Equal("System.Int32", symbol.Type.ToTestDisplayString());
34896Assert.Equal("System.Int32", symbol.Type.ToTestDisplayString());
34950Assert.Equal("System.Int32", symbol.Type.ToTestDisplayString());
35008Assert.Equal("System.Int32", symbol.Type.ToTestDisplayString());
35059Assert.Equal("System.Int32", symbol.Type.ToTestDisplayString());
35112Assert.Equal("System.Int32", symbol.Type.ToTestDisplayString());
35151Assert.Equal("System.Int32", symbol.Type.ToTestDisplayString());
35185Assert.Equal("var", symbol.Type.ToTestDisplayString());
35224Assert.Equal("var", symbol.Type.ToTestDisplayString());
35268Assert.Equal("var", symbol.Type.ToTestDisplayString());
35299Assert.Equal("var", symbol.Type.ToTestDisplayString());
35338Assert.Equal("var", symbol.Type.ToTestDisplayString());
35371Assert.Equal("var", symbol.Type.ToTestDisplayString());
35407Assert.Equal("var", symbol.Type.ToTestDisplayString());
35446Assert.Equal("var", symbol.Type.ToTestDisplayString());
35476Assert.Equal("var", symbol.Type.ToTestDisplayString());
35513Assert.Equal("var", symbol.Type.ToTestDisplayString());
Semantics\PatternMatchingTests_ListPatterns.cs (11)
3332Assert.Equal(expectedType, local.Type.ToTestDisplayString(includeNonNullable: true));
3339Assert.Equal(expectedType, local.Type.ToTestDisplayString(includeNonNullable: true));
3647Assert.Equal(declaredType, ((ILocalSymbol)symbol).Type.ToDisplayString());
3727Assert.Equal("System.Int32", ((ILocalSymbol)symbol).Type.ToTestDisplayString());
3742Assert.Equal("System.Int32", ((ILocalSymbol)symbol).Type.ToTestDisplayString());
4097Assert.Equal(expectedType, local.Type.ToTestDisplayString(includeNonNullable: true));
4184Assert.Equal(expectedType, local.Type.ToTestDisplayString(includeNonNullable: true));
4261Assert.Equal(expectedType, local.Type.ToTestDisplayString(includeNonNullable: true));
4376Assert.Equal(expectedType, local.Type.ToTestDisplayString(includeNonNullable: true));
4417Assert.Equal(declaredType, ((ILocalSymbol)symbol).Type.ToDisplayString());
4568Assert.Equal(expectedType, local.Type.ToTestDisplayString(includeNonNullable: true));
Microsoft.CodeAnalysis.CSharp.Features (15)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (54)
Semantics\NullableReferenceTypesTests.cs (19)
5174Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, local.Type.NullableAnnotation);
5175Assert.Equal("T?", local.Type.ToTestDisplayString(includeNonNullable: true));
145420Assert.Equal("System.Object?", local.Type.ToTestDisplayString());
145422Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, local.Type.NullableAnnotation);
145461Assert.Equal("System.Object?", local.Type.ToTestDisplayString());
145463Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, local.Type.NullableAnnotation);
145501Assert.Equal("System.Object?", local.Type.ToTestDisplayString());
145503Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, local.Type.NullableAnnotation);
145539Assert.Equal("System.Object?", local.Type.ToTestDisplayString());
145541Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, local.Type.NullableAnnotation);
145577Assert.Equal("System.Object?", local.Type.ToTestDisplayString());
145579Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, local.Type.NullableAnnotation);
145681Assert.Equal("System.Object?", local.Type.ToTestDisplayString());
145683Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, local.Type.NullableAnnotation);
145720Assert.Equal("System.Object?", local.Type.ToTestDisplayString());
145722Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, local.Type.NullableAnnotation);
154927symbol.Type.NullableAnnotation);
158861Assert.Equal("T?", local.Type.ToTestDisplayString());
158862Assert.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.Features (13)
LanguageServices\AnonymousTypeDisplayService\AbstractStructuralTypeDisplayService.StructuralTypeCollectorVisitor.cs (1)
45=> symbol.Type.Accept(this);
Microsoft.CodeAnalysis.PublicApiAnalyzers (1)
Microsoft.CodeAnalysis.ResxSourceGenerator (1)
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)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\VariableDeclaratorSyntaxExtensions.vb (1)
41Return localSymbol.Type
Microsoft.CodeAnalysis.VisualBasic.Features (3)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (4)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\VariableDeclaratorSyntaxExtensions.vb (1)
41Return localSymbol.Type
Microsoft.CodeAnalysis.Workspaces (6)
Microsoft.VisualStudio.LanguageServices.CSharp (1)
Microsoft.VisualStudio.LanguageServices.VisualBasic (2)
Roslyn.Diagnostics.Analyzers (6)
Test.Utilities (1)
Text.Analyzers (1)