80 references to IsVar
Microsoft.CodeAnalysis.CSharp (12)
Binder\Binder_Expressions.cs (1)
3002if (typeSyntax.IsVar)
Binder\Binder_Symbols.cs (2)
109if (syntax.IsVar) 184/// PREREQUISITE: syntax should be checked to match the keyword, like <see cref="TypeSyntax.IsVar"/> or <see cref="TypeSyntax.IsUnmanaged"/>.
Binder\ForEachLoopBinder.cs (1)
1081((_syntax as ForEachStatementSyntax)?.Type.IsVar == true) ?
Compilation\CSharpSemanticModel.cs (2)
543if (((TypeSyntax)expression).IsVar) 973if (((TypeSyntax)expression).IsVar)
Compilation\SyntaxTreeSemanticModel.cs (1)
347if (!type.IsVar)
Symbols\Source\GlobalExpressionVariable.cs (1)
53return (typeSyntax == null || typeSyntax.SkipScoped(out _).SkipRef().IsVar)
Symbols\Source\SourceLocalSymbol.cs (3)
148return closestTypeSyntax.SkipScoped(out _).SkipRef().IsVar 179return typeSyntax?.SkipScoped(out _).SkipRef().IsVar != false && kind != LocalDeclarationKind.DeclarationExpressionVariable 322if (typeSyntax.IsVar)
Syntax\SyntaxNodeExtensions.cs (1)
360((IdentifierNameSyntax)invocationTarget).IsVar;
Microsoft.CodeAnalysis.CSharp.CodeStyle (17)
CSharpSemanticFacts.cs (1)
350if (node is IdentifierNameSyntax { IsVar: true })
CSharpUseDeconstructionDiagnosticAnalyzer.cs (1)
221if (type.IsVar)
CSharpUseExplicitTypeHelper.cs (3)
44if (!variableDeclaration.Type.StripRefIfNeeded().IsVar) 56if (!forEachStatement.Type.StripRefIfNeeded().IsVar) 120if (!declaration.Type.IsVar)
CSharpUseImplicitObjectCreationDiagnosticAnalyzer.cs (1)
70!variableDeclaration.Type.IsVar)
CSharpUseImplicitTypeHelper.cs (6)
33if (typeName.StripRefIfNeeded().IsVar) 50if (type.IsVar) 63if (type.IsVar || (type.Kind() == SyntaxKind.RefType && ((RefTypeSyntax)type).Type.IsVar)) 95Debug.Assert(!typeName.StripRefIfNeeded().IsVar, "'var' special case should have prevented analysis of this variable."); 348if (declaration.Type.IsVar)
CSharpUseLocalFunctionDiagnosticAnalyzer.cs (1)
191if (!localDeclaration.Declaration.Type.IsVar)
DefaultExpressionSyntaxExtensions.cs (1)
46if (typeSyntax.IsVar)
NullableImpactingSpanWalker.cs (1)
136if (typeSyntax.IsVar)
ParenthesizedExpressionSyntaxExtensions.cs (1)
82return !varDecl.Type.IsVar;
TypeSyntaxExtensions.cs (1)
28if (!typeSyntax.IsVar)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (6)
CSharpInlineDeclarationCodeFixProvider.cs (2)
244var explicitType = declaration.Type.IsVar ? local.Type?.GenerateTypeSyntax() : declaration.Type; 342if (declarationExpression.Type.IsVar)
CSharpMoveDeclarationNearReferenceService.cs (1)
58if (type.IsVar)
CSharpTypeInferenceService.TypeInferrer.cs (2)
2238if (!variableType.IsVar || 2297if (declExpr.Type.IsVar &&
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs\SyntaxTreeExtensions.cs (1)
1511binaryExpressionSyntax.Right == typeSyntax && !typeSyntax.IsVar)
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (2)
Semantics\PatternMatchingTestBase.cs (2)
154if (!decl.Type.IsVar || !type.IsErrorType()) 275if (typeSyntax.IsVar && type.IsErrorType())
Microsoft.CodeAnalysis.CSharp.Features (18)
CodeRefactorings\InlineTemporary\InlineTemporaryCodeRefactoringProvider.cs (1)
387var isVar = ((VariableDeclarationSyntax)variableDeclarator.Parent).Type.IsVar;
ConvertLinq\ConvertForEachToLinqQuery\AbstractConverter.cs (2)
108type: forEachStatement.Type.IsVar ? null : forEachStatement.Type, 109identifier: forEachStatement.Type.IsVar
CSharpInlineDeclarationCodeFixProvider.cs (2)
244var explicitType = declaration.Type.IsVar ? local.Type?.GenerateTypeSyntax() : declaration.Type; 342if (declarationExpression.Type.IsVar)
CSharpUseDeconstructionDiagnosticAnalyzer.cs (1)
221if (type.IsVar)
CSharpUseImplicitObjectCreationDiagnosticAnalyzer.cs (1)
70!variableDeclaration.Type.IsVar)
CSharpUseLocalFunctionDiagnosticAnalyzer.cs (1)
191if (!localDeclaration.Declaration.Type.IsVar)
Debugging\DataTipInfoGetter.cs (1)
76if (expression is TypeSyntax typeSyntax && typeSyntax.IsVar)
DocumentHighlighting\CSharpDocumentHighlightsService.cs (1)
62if (type.IsVar)
GenerateMember\GenerateEnumMember\CSharpGenerateEnumMemberService.cs (1)
36!identifierName.IsVar)
GenerateType\CSharpGenerateTypeService.cs (1)
136if (simpleName.IsVar)
InlineHints\CSharpInlineTypeHintsService.cs (3)
38if (node is VariableDeclarationSyntax { Type.IsVar: true } variableDeclaration && 50if (node is DeclarationExpressionSyntax { Type.IsVar: true, Designation: not ParenthesizedVariableDesignationSyntax } declarationExpression) 67else if (node is ForEachStatementSyntax { Type.IsVar: true } forEachStatement)
NullableImpactingSpanWalker.cs (1)
136if (typeSyntax.IsVar)
ReplaceConditionalWithStatements\CSharpReplaceConditionalWithStatementsCodeRefactoringProvider.cs (1)
71if (type.IsVar)
SpellCheck\CSharpSpellcheckCodeFixProvider.cs (1)
38=> !name.IsVar;
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
Semantics\NullableReferenceTypesTests.cs (1)
33062var varDecl = tree.GetRoot().DescendantNodes().OfType<LocalDeclarationStatementSyntax>().Where(d => d.Declaration.Type.IsVar).Single();
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Symbols\Source\NullablePublicAPITests.cs (1)
2565if (type.IsVar)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Parsing\StatementParsingTests.cs (1)
911Assert.True(fs.Declaration.Type.IsVar);
Microsoft.CodeAnalysis.CSharp.Workspaces (22)
Classification\SyntaxClassification\NameSyntaxClassifier.cs (1)
162if (name.IsVar &&
CSharpMoveDeclarationNearReferenceService.cs (1)
58if (type.IsVar)
CSharpSemanticFacts.cs (1)
350if (node is IdentifierNameSyntax { IsVar: true })
CSharpTypeInferenceService.TypeInferrer.cs (2)
2238if (!variableType.IsVar || 2297if (declExpr.Type.IsVar &&
CSharpUseExplicitTypeHelper.cs (3)
44if (!variableDeclaration.Type.StripRefIfNeeded().IsVar) 56if (!forEachStatement.Type.StripRefIfNeeded().IsVar) 120if (!declaration.Type.IsVar)
CSharpUseImplicitTypeHelper.cs (6)
33if (typeName.StripRefIfNeeded().IsVar) 50if (type.IsVar) 63if (type.IsVar || (type.Kind() == SyntaxKind.RefType && ((RefTypeSyntax)type).Type.IsVar)) 95Debug.Assert(!typeName.StripRefIfNeeded().IsVar, "'var' special case should have prevented analysis of this variable."); 348if (declaration.Type.IsVar)
DefaultExpressionSyntaxExtensions.cs (1)
46if (typeSyntax.IsVar)
Editing\CSharpImportAdder.cs (1)
199if (node.IsVar)
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\TypeSyntaxExtensions.cs\TypeSyntaxExtensions.cs (1)
28if (!typeSyntax.IsVar)
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs\SyntaxTreeExtensions.cs (1)
1511binaryExpressionSyntax.Right == typeSyntax && !typeSyntax.IsVar)
ParenthesizedExpressionSyntaxExtensions.cs (1)
82return !varDecl.Type.IsVar;
Simplification\CSharpSimplificationService.Expander.cs (1)
440if (originalSimpleName.IsVar)
Simplification\Simplifiers\NameSimplifier.cs (2)
44if (name.IsVar || name.IsNint || name.IsNuint) 272if (!name.IsVar && symbol.Kind == SymbolKind.NamedType && !name.IsLeftSideOfQualifiedName())