2 instantiations of LambdaSymbol
Microsoft.CodeAnalysis.CSharp (2)
Binder\Binder.IdentifierUsedAsValueFinder.cs (1)
181
var lambdaSymbol = new
LambdaSymbol
(
BoundTree\UnboundLambda.cs (1)
931
=> new
LambdaSymbol
(
94 references to LambdaSymbol
Microsoft.CodeAnalysis.CSharp (67)
Binder\Binder.IdentifierUsedAsValueFinder.cs (2)
181
var
lambdaSymbol = new LambdaSymbol(
544
(
LambdaSymbol
lambdaSymbol, Binder lambdaBodyBinder, BindingDiagnosticBag diagnostics) => throw ExceptionUtilities.Unreachable()),
Binder\Binder.QueryUnboundLambdaState.cs (3)
17
private delegate BoundBlock LambdaBodyFactory(
LambdaSymbol
lambdaSymbol, Binder lambdaBodyBinder, BindingDiagnosticBag diagnostics);
64
public override Binder GetWithParametersBinder(
LambdaSymbol
lambdaSymbol, Binder binder)
84
protected override BoundBlock BindLambdaBodyCore(
LambdaSymbol
lambdaSymbol, Binder lambdaBodyBinder, BindingDiagnosticBag diagnostics)
Binder\Binder.WithQueryLambdaParametersBinder.cs (1)
26
public WithQueryLambdaParametersBinder(
LambdaSymbol
lambdaSymbol, RangeVariableMap rangeVariableMap, Binder next)
Binder\Binder_Await.cs (1)
184
new CSDiagnosticInfo(ErrorCode.ERR_BadAwaitWithoutAsyncLambda, ((
LambdaSymbol
)method).MessageID.Localize());
Binder\Binder_Conversions.cs (3)
2231
CheckLambdaConversion((
LambdaSymbol
)boundLambda.Symbol, destination, diagnostics);
2314
private static void CheckLambdaConversion(
LambdaSymbol
lambdaSymbol, TypeSymbol targetType, BindingDiagnosticBag diagnostics)
2389
LambdaSymbol
lambdaSymbol,
Binder\Binder_Expressions.cs (1)
5489
CheckLambdaConversion((
LambdaSymbol
)boundLambda.Symbol, type, diagnostics);
Binder\Binder_Query.cs (4)
702
LambdaBodyFactory bodyFactory = (
LambdaSymbol
lambdaSymbol, Binder lambdaBodyBinder, BindingDiagnosticBag d) =>
736
LambdaBodyFactory bodyFactory = (
LambdaSymbol
lambdaSymbol, Binder lambdaBodyBinder, BindingDiagnosticBag d) =>
844
return MakeQueryUnboundLambda(expression, new QueryUnboundLambdaState(this, qvm, parameters, (
LambdaSymbol
lambdaSymbol, Binder lambdaBodyBinder, BindingDiagnosticBag diagnostics) =>
855
return MakeQueryUnboundLambda(expression, new QueryUnboundLambdaState(this, qvm, ImmutableArray.Create(parameter), (
LambdaSymbol
lambdaSymbol, Binder lambdaBodyBinder, BindingDiagnosticBag diagnostics) =>
Binder\Binder_Statements.cs (6)
3021
if ((object)returnType ==
LambdaSymbol
.ReturnTypeIsBeingInferred)
3105
if (container is
LambdaSymbol
)
3234
if (this.ContainingMemberOrLambda is
LambdaSymbol
)
3426
var
lambda = this.ContainingMemberOrLambda as
LambdaSymbol
;
3571
var inferringLambda = this.ContainingMemberOrLambda is MethodSymbol method && (object)method.ReturnType ==
LambdaSymbol
.ReturnTypeIsBeingInferred;
Binder\LocalBinderFactory.cs (1)
302
if (target is
LambdaSymbol
lambda)
Binder\WithLambdaParametersBinder.cs (2)
18
protected readonly
LambdaSymbol
lambdaSymbol;
22
public WithLambdaParametersBinder(
LambdaSymbol
lambdaSymbol, Binder enclosing)
BoundTree\NullabilityRewriter.cs (3)
215
case
LambdaSymbol
lambda:
231
Symbol remapLambda(BoundLambda boundLambda,
LambdaSymbol
lambda)
240
LambdaSymbol
updatedLambda;
BoundTree\UnboundLambda.cs (21)
86
: this(syntax, unboundLambda.WithNoCache(), (
LambdaSymbol
)binder.ContainingMemberOrLambda!, body, diagnostics, binder, delegateType)
174
internal
LambdaSymbol
CreateLambdaSymbol(NamedTypeSymbol delegateType, Symbol containingSymbol) =>
177
internal
LambdaSymbol
CreateLambdaSymbol(
482
public Binder GetWithParametersBinder(
LambdaSymbol
lambdaSymbol, Binder binder)
606
protected BoundBlock BindLambdaBody(
LambdaSymbol
lambdaSymbol, Binder lambdaBodyBinder, BindingDiagnosticBag diagnostics)
617
protected abstract BoundBlock BindLambdaBodyCore(
LambdaSymbol
lambdaSymbol, Binder lambdaBodyBinder, BindingDiagnosticBag diagnostics);
749
var
lambdaSymbol = CreateLambdaSymbol(
823
LambdaSymbol
lambdaSymbol;
843
(lambdaSymbol = (
LambdaSymbol
)returnInferenceLambda.Symbol).RefKind == refKind &&
844
(object)
LambdaSymbol
.InferenceFailureReturnType != lambdaSymbol.ReturnType &&
924
internal
LambdaSymbol
CreateLambdaSymbol(
942
internal
LambdaSymbol
CreateLambdaSymbol(NamedTypeSymbol delegateType, Symbol containingSymbol)
981
(
var
lambdaSymbol, var block, var lambdaBodyBinder, var diagnostics) = BindWithParameterAndReturnType(parameterTypes, parameterRefKinds, returnType, refKind, refCustomModifiers);
1016
: TypeWithAnnotations.Create(
LambdaSymbol
.InferenceFailureReturnType);
1042
private (
LambdaSymbol
lambdaSymbol, BoundBlock block, ExecutableCodeBinder lambdaBodyBinder, BindingDiagnosticBag diagnostics) BindWithParameterAndReturnType(
1051
var
lambdaSymbol = CreateLambdaSymbol(Binder.ContainingMemberOrLambda!,
1191
public virtual Binder GetWithParametersBinder(
LambdaSymbol
lambdaSymbol, Binder binder)
1278
(
var
lambdaSymbol, var block, var lambdaBodyBinder, var diagnostics) = BindWithParameterAndReturnType(parameterTypes, parameterRefKinds, returnType, refKind, refCustomModifiers);
1315
.OrderBy(lambda => GetLambdaSortString((
LambdaSymbol
)lambda.Value.Symbol))
1321
private static string GetLambdaSortString(
LambdaSymbol
lambda)
1648
protected override BoundBlock BindLambdaBodyCore(
LambdaSymbol
lambdaSymbol, Binder lambdaBodyBinder, BindingDiagnosticBag diagnostics)
Compilation\MemberSemanticModel.cs (3)
875
LambdaSymbol
lambdaSymbol;
878
lambdaSymbol = symbolInfo.Symbol.GetSymbol<
LambdaSymbol
>();
882
lambdaSymbol = symbolInfo.CandidateSymbols.Single().GetSymbol<
LambdaSymbol
>();
FlowAnalysis\DefiniteAssignment.cs (2)
1854
if (parameter is SourceComplexParameterSymbolBase { ContainingSymbol: LocalFunctionSymbol or
LambdaSymbol
} sourceComplexParam)
2384
VisitAttributes(((
LambdaSymbol
)node.Symbol).BindMethodAttributes());
FlowAnalysis\NullableWalker.cs (7)
1961
if (node is BoundLambda boundLambda && originalSymbol is
LambdaSymbol
l && updatedSymbol is NamedTypeSymbol n)
3167
Debug.Assert((object)returnType !=
LambdaSymbol
.ReturnTypeIsBeingInferred);
3781
(
LambdaSymbol
l, NamedTypeSymbol n) _ when n.IsDelegateType() => AreLambdaAndNewDelegateSimilar(l, n),
3789
private static bool AreLambdaAndNewDelegateSimilar(
LambdaSymbol
l, NamedTypeSymbol n)
9307
LambdaSymbol
sourceMethod = (
LambdaSymbol
)lambda.Symbol;
10360
ReportNullabilityMismatchWithTargetDelegate(((
LambdaSymbol
)lambda.Symbol).DiagnosticLocation, delegateType, lambda);
FlowAnalysis\NullableWalker.SnapshotManager.cs (2)
72
internal NamedTypeSymbol? GetUpdatedDelegateTypeForLambda(
LambdaSymbol
lambda)
235
if (node is BoundLambda && symbol is
LambdaSymbol
)
Lowering\LocalRewriter\LocalRewriter_ReturnStatement.cs (1)
42
if (method is
LambdaSymbol
)
Symbols\Source\LambdaParameterSymbol.cs (1)
18
LambdaSymbol
owner,
Symbols\Source\LambdaSymbol.cs (1)
387
return symbol is
LambdaSymbol
lambda
Symbols\Source\SourceMethodSymbol.cs (1)
111
Debug.Assert(target is not (
LambdaSymbol
or LocalFunctionSymbol));
Symbols\Source\SourceParameterSymbol.cs (1)
44
Debug.Assert(owner is not
LambdaSymbol
); // therefore we don't need to deal with discard parameters
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (6)
Attributes\AttributeTests_WellKnownAttributes.cs (6)
11438
var
lambda = exprs.SelectAsArray(e => model.GetSymbolInfo(e).Symbol).Single().GetSymbol<
LambdaSymbol
>();
11463
var
lambda = exprs.SelectAsArray(e => model.GetSymbolInfo(e).Symbol).Single().GetSymbol<
LambdaSymbol
>();
11494
var
lambda = exprs.SelectAsArray(e => model.GetSymbolInfo(e).Symbol).Single().GetSymbol<
LambdaSymbol
>();
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (20)
Semantics\LambdaTests.cs (8)
4117
var
lambda = exprs.SelectAsArray(e => GetLambdaSymbol(model, e)).Single();
4180
var
lambda = exprs.SelectAsArray(e => GetLambdaSymbol(model, e)).Single();
4867
var
lambda = exprs.SelectAsArray(e => GetLambdaSymbol(model, e)).Single();
4922
var
lambda = exprs.SelectAsArray(e => GetLambdaSymbol(model, e)).Single();
5023
var
lambda = GetLambdaSymbol(model, expr);
6216
private static
LambdaSymbol
GetLambdaSymbol(SemanticModel model, LambdaExpressionSyntax syntax)
6218
return model.GetSymbolInfo(syntax).Symbol.GetSymbol<
LambdaSymbol
>();
6889
var lambdas = tree.GetRoot().DescendantNodes().OfType<ParenthesizedLambdaExpressionSyntax>().Select(e => model.GetSymbolInfo(e).Symbol.GetSymbol<
LambdaSymbol
>()).ToArray();
Semantics\RefFieldTests.cs (12)
11180
static void verifyParameter((NamedTypeSymbol,
LambdaSymbol
) delegateTypeAndLambda, int parameterIndex, string expectedDisplayType, string expectedDisplayName, RefKind expectedRefKind, ScopedKind expectedScope, bool expectedHasUnscopedRefAttribute, bool expectedHasUnscopedRefAttributeInDelegate)
11187
static (NamedTypeSymbol,
LambdaSymbol
) getDelegateTypeAndLambda(SemanticModel model, VariableDeclaratorSyntax decl)
11191
var
lambda = model.GetSymbolInfo(value).Symbol.GetSymbol<
LambdaSymbol
>();
11456
var lambdas = tree.GetRoot().DescendantNodes().OfType<SimpleLambdaExpressionSyntax>().Select(e => model.GetSymbolInfo(e).Symbol.GetSymbol<
LambdaSymbol
>()).ToArray();
24497
var lambdas = tree.GetRoot().DescendantNodes().OfType<ParenthesizedLambdaExpressionSyntax>().Select(e => model.GetSymbolInfo(e).Symbol.GetSymbol<
LambdaSymbol
>()).ToArray();
24533
var lambdas = tree.GetRoot().DescendantNodes().OfType<ParenthesizedLambdaExpressionSyntax>().Select(e => model.GetSymbolInfo(e).Symbol.GetSymbol<
LambdaSymbol
>()).ToArray();
24570
var lambdas = tree.GetRoot().DescendantNodes().OfType<ParenthesizedLambdaExpressionSyntax>().Select(e => model.GetSymbolInfo(e).Symbol.GetSymbol<
LambdaSymbol
>()).ToArray();
25347
static void verifyParameter((NamedTypeSymbol,
LambdaSymbol
) delegateTypeAndLambda, int parameterIndex, string expectedDisplayType, string expectedDisplayName, RefKind expectedRefKind, ScopedKind expectedScope)
25354
static (NamedTypeSymbol,
LambdaSymbol
) getDelegateTypeAndLambda(SemanticModel model, VariableDeclaratorSyntax decl)
25358
var
lambda = model.GetSymbolInfo(value).Symbol.GetSymbol<
LambdaSymbol
>();
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Symbols\SymbolEqualityTests.cs (1)
965
Select(op => op.Symbol.GetSymbol<
LambdaSymbol
>()).ToImmutableArray();