4 types derived from SourceLocalSymbol
Microsoft.CodeAnalysis.CSharp (4)
Symbols\Source\SourceLocalSymbol.cs (4)
512private sealed class LocalWithInitializer : SourceLocalSymbol 621private sealed class ForEachLocalSymbol : SourceLocalSymbol 660private sealed class DeconstructionLocalSymbol : SourceLocalSymbol 723private sealed class LocalSymbolWithEnclosingContext : SourceLocalSymbol
3 instantiations of SourceLocalSymbol
Microsoft.CodeAnalysis.CSharp (3)
Symbols\Source\SourceLocalSymbol.cs (3)
149: new SourceLocalSymbol(containingSymbol, scopeBinder, allowRefKind: false, allowScoped: true, closestTypeSyntax, identifierToken, kind); 180: new SourceLocalSymbol(containingSymbol, scopeBinder, allowRefKind: false, allowScoped: true, typeSyntax, identifierToken, kind); 214: new SourceLocalSymbol(containingSymbol, scopeBinder, allowRefKind: allowRefKind, allowScoped: allowScoped, typeSyntax, identifierToken, declarationKind);
65 references to SourceLocalSymbol
Microsoft.CodeAnalysis.CSharp (65)
Binder\Binder.ValueChecks.cs (5)
2739private bool ShouldInferDeclarationExpressionValEscape(BoundExpression argument, [NotNullWhen(true)] out SourceLocalSymbol? localSymbol) 2747if (symbol is SourceLocalSymbol local && 2758Debug.Assert(symbol is null or SourceLocalSymbol or GlobalExpressionVariable); 2854if (ShouldInferDeclarationExpressionValEscape(argument, out var localSymbol)) 2946if (ShouldInferDeclarationExpressionValEscape(argument, out var localSymbol))
Binder\Binder_Deconstruct.cs (1)
870SourceLocalSymbol localSymbol = LookupLocal(designation.Identifier);
Binder\Binder_Expressions.cs (2)
2035else if ((localSymbol as SourceLocalSymbol)?.IsVar == true && localSymbol.ForbiddenZone?.Contains(node) == true) 3154SourceLocalSymbol localSymbol = this.LookupLocal(designation.Identifier);
Binder\Binder_Patterns.cs (1)
879SourceLocalSymbol localSymbol = this.LookupLocal(identifier);
Binder\Binder_Statements.cs (6)
973SourceLocalSymbol localSymbol, 1194private SourceLocalSymbol LocateDeclaredVariableSymbol(VariableDeclaratorSyntax declarator, TypeSyntax typeSyntax, LocalDeclarationKind outerKind) 1200private SourceLocalSymbol LocateDeclaredVariableSymbol(SyntaxToken identifier, TypeSyntax typeSyntax, EqualsValueClauseSyntax equalsValue, LocalDeclarationKind kind) 1202SourceLocalSymbol localSymbol = this.LookupLocal(identifier); 1208localSymbol = SourceLocalSymbol.MakeLocal( 1851protected virtual SourceLocalSymbol LookupLocal(SyntaxToken nameToken)
Binder\BuckStopsHereBinder.cs (1)
53protected override SourceLocalSymbol? LookupLocal(SyntaxToken nameToken)
Binder\CatchClauseBinder.cs (1)
34locals.Add(SourceLocalSymbol.MakeLocal(this.ContainingMemberOrLambda, this, allowRefKind: false, allowScoped: false, declarationOpt.Type, declarationOpt.Identifier, LocalDeclarationKind.CatchVariable, initializer: null));
Binder\ExpressionVariableFinder.cs (3)
607return SourceLocalSymbol.MakeLocalSymbolWithEnclosingContext( 629return SourceLocalSymbol.MakeLocalSymbolWithEnclosingContext( 654return SourceLocalSymbol.MakeDeconstructionLocal(
Binder\ForEachLoopBinder.cs (7)
29private SourceLocalSymbol IterationVariable 33return (_syntax.Kind() == SyntaxKind.ForEachStatement) ? (SourceLocalSymbol)this.Locals[0] : null; 88var iterationVariable = SourceLocalSymbol.MakeForeachLocal( 150SourceLocalSymbol localSymbol = SourceLocalSymbol.MakeDeconstructionLocal( 313SourceLocalSymbol local = this.IterationVariable;
Binder\ForLoopBinder.cs (1)
48var localSymbol = MakeLocal(_syntax.Declaration, vdecl, LocalDeclarationKind.RegularVariable, allowScoped: true);
Binder\InContainerBinder.cs (1)
136protected override SourceLocalSymbol LookupLocal(SyntaxToken nameToken)
Binder\InMethodBinder.cs (1)
59protected override SourceLocalSymbol LookupLocal(SyntaxToken nameToken)
Binder\LocalScopeBinder.cs (6)
216var localSymbol = MakeLocal(decl.Declaration, vdecl, kind, allowScoped: true, localDeclarationBinder); 331protected SourceLocalSymbol MakeLocal(VariableDeclarationSyntax declaration, VariableDeclaratorSyntax declarator, LocalDeclarationKind kind, bool allowScoped, Binder initializerBinderOpt = null) 333return SourceLocalSymbol.MakeLocal( 381protected override SourceLocalSymbol LookupLocal(SyntaxToken nameToken) 386if (result.IdentifierToken == nameToken) return (SourceLocalSymbol)result; 393return (SourceLocalSymbol)local;
Binder\RefSafetyAnalysis.cs (2)
484var localSymbol = (SourceLocalSymbol)node.LocalSymbol;
Binder\WithExternAliasesBinder.cs (1)
62protected sealed override SourceLocalSymbol? LookupLocal(SyntaxToken nameToken)
Binder\WithUsingNamespacesAndTypesBinder.cs (1)
218protected override SourceLocalSymbol? LookupLocal(SyntaxToken nameToken)
BoundTree\NullabilityRewriter.cs (2)
141case SourceLocalSymbol local: 186Symbol remapLocal(SourceLocalSymbol local)
BoundTree\VariablePendingInference.cs (2)
51var localSymbol = (SourceLocalSymbol)this.VariableSymbol;
Compilation\CSharpSemanticModel.cs (2)
3282return (local is SourceLocalSymbol { DeclarationKind: LocalDeclarationKind.ForEachIterationVariable } sourceLocal 3294internal abstract LocalSymbol GetAdjustedLocalSymbol(SourceLocalSymbol originalSymbol);
Compilation\MemberSemanticModel.cs (2)
700return GetAdjustedLocalSymbol((SourceLocalSymbol)local); 709internal override LocalSymbol GetAdjustedLocalSymbol(SourceLocalSymbol local)
Compilation\SpeculativeSemanticModelWithMemberModel.cs (1)
340internal override LocalSymbol GetAdjustedLocalSymbol(SourceLocalSymbol local)
Compilation\SyntaxTreeSemanticModel.cs (1)
1870internal override LocalSymbol GetAdjustedLocalSymbol(SourceLocalSymbol originalSymbol)
FlowAnalysis\DefiniteAssignment.cs (1)
2354if ((localSymbol as SourceLocalSymbol)?.IsVar == true && localSymbol.ForbiddenZone?.Contains(node.Syntax) == true)
FlowAnalysis\NullableWalker.cs (2)
3021if (local is SourceLocalSymbol { IsVar: true } && local.ForbiddenZone?.Contains(node.Syntax) == true) 11110else if (iterationVariable is SourceLocalSymbol { IsVar: true })
FlowAnalysis\NullableWalker.SnapshotManager.cs (1)
60internal TypeWithAnnotations? GetUpdatedTypeForLocalSymbol(SourceLocalSymbol symbol)
FlowAnalysis\NullableWalker_Patterns.cs (1)
681if (variableAccess is BoundLocal { LocalSymbol: SourceLocalSymbol local } boundLocal)
Symbols\Source\SourceLocalSymbol.cs (4)
108public static SourceLocalSymbol MakeForeachLocal( 135public static SourceLocalSymbol MakeDeconstructionLocal( 200public static SourceLocalSymbol MakeLocal( 499return obj is SourceLocalSymbol symbol
Symbols\UpdatedContainingSymbolLocal.cs (6)
18internal static UpdatedContainingSymbolAndNullableAnnotationLocal CreateForTest(SourceLocalSymbol underlyingLocal, Symbol updatedContainingSymbol, TypeWithAnnotations updatedType) 23private UpdatedContainingSymbolAndNullableAnnotationLocal(SourceLocalSymbol underlyingLocal, Symbol updatedContainingSymbol, TypeWithAnnotations updatedType, bool assertContaining) 34internal UpdatedContainingSymbolAndNullableAnnotationLocal(SourceLocalSymbol underlyingLocal, Symbol updatedContainingSymbol, TypeWithAnnotations updatedType) 39private readonly SourceLocalSymbol _underlyingLocal; 55SourceLocalSymbol? otherSource = otherLocal switch 58SourceLocalSymbol source => source,