Binder\Binder_Statements.cs (22)
201BindForOrUsingOrFixedDeclarations(declarationSyntax, LocalDeclarationKind.FixedVariable, diagnostics, out declarations);
727var kind = isConst ? LocalDeclarationKind.Constant : LocalDeclarationKind.RegularVariable;
948LocalDeclarationKind kind,
974LocalDeclarationKind kind,
1057if (kind != LocalDeclarationKind.FixedVariable)
1071if (kind == LocalDeclarationKind.FixedVariable)
1108if (kind == LocalDeclarationKind.FixedVariable || kind == LocalDeclarationKind.UsingVariable)
1121else if (kind == LocalDeclarationKind.Constant && initializerOpt != null && !localDiagnostics.HasAnyResolvedErrors())
1194private SourceLocalSymbol LocateDeclaredVariableSymbol(VariableDeclaratorSyntax declarator, TypeSyntax typeSyntax, LocalDeclarationKind outerKind)
1196LocalDeclarationKind kind = outerKind == LocalDeclarationKind.UsingVariable ? LocalDeclarationKind.UsingVariable : LocalDeclarationKind.RegularVariable;
1200private SourceLocalSymbol LocateDeclaredVariableSymbol(SyntaxToken identifier, TypeSyntax typeSyntax, EqualsValueClauseSyntax equalsValue, LocalDeclarationKind kind)
2794internal BoundStatement BindForOrUsingOrFixedDeclarations(VariableDeclarationSyntax nodeOpt, LocalDeclarationKind localKind, BindingDiagnosticBag diagnostics, out ImmutableArray<BoundLocalDeclaration> declarations)
2803Debug.Assert(typeSyntax is not ScopedTypeSyntax || localKind is LocalDeclarationKind.RegularVariable or LocalDeclarationKind.UsingVariable);
2814if (localKind == LocalDeclarationKind.RegularVariable)
3334if (local?.DeclarationKind == LocalDeclarationKind.CatchVariable)
Symbols\Source\SourceLocalSymbol.cs (27)
36private readonly LocalDeclarationKind _declarationKind;
48LocalDeclarationKind declarationKind)
51Debug.Assert(declarationKind != LocalDeclarationKind.None);
115return new ForEachLocalSymbol(containingMethod, binder, typeSyntax, identifierToken, collection, LocalDeclarationKind.ForEachIterationVariable);
141LocalDeclarationKind kind,
161LocalDeclarationKind kind,
178return typeSyntax?.SkipScoped(out _).SkipRef().IsVar != false && kind != LocalDeclarationKind.DeclarationExpressionVariable
207LocalDeclarationKind declarationKind,
211Debug.Assert(declarationKind != LocalDeclarationKind.ForEachIterationVariable);
222internal override LocalDeclarationKind DeclarationKind
432case LocalDeclarationKind.RegularVariable:
436case LocalDeclarationKind.Constant:
437case LocalDeclarationKind.FixedVariable:
438case LocalDeclarationKind.UsingVariable:
442case LocalDeclarationKind.ForEachIterationVariable:
446case LocalDeclarationKind.CatchVariable:
450case LocalDeclarationKind.OutVariable:
451case LocalDeclarationKind.DeclarationExpressionVariable:
452case LocalDeclarationKind.DeconstructionVariable:
453case LocalDeclarationKind.PatternVariable:
531LocalDeclarationKind declarationKind,
535Debug.Assert(declarationKind != LocalDeclarationKind.ForEachIterationVariable);
631LocalDeclarationKind declarationKind) :
634Debug.Assert(declarationKind == LocalDeclarationKind.ForEachIterationVariable);
671LocalDeclarationKind declarationKind,
735LocalDeclarationKind declarationKind,
812Debug.Assert(this.DeclarationKind == LocalDeclarationKind.DeclarationExpressionVariable);