5 instantiations of UnboundLambda
Microsoft.CodeAnalysis.CSharp (5)
Binder\Binder_Query.cs (1)
874var lambda = new UnboundLambda(node, state, functionType: null, withDependencies, hasErrors: false) { WasCompilerGenerated = true };
BoundTree\UnboundLambda.cs (3)
430var lambda = new UnboundLambda(syntax, data, functionType, withDependencies, hasErrors: hasErrors); 447var lambda = new UnboundLambda(Syntax, data, FunctionType, WithDependencies, nullableState, getterNullResilienceData, HasErrors); 460var lambda = new UnboundLambda(Syntax, data, FunctionType, WithDependencies, _nullableState, _getterNullResilienceData, HasErrors);
Generated\BoundNodes.xml.Generated.cs (1)
7695var result = new UnboundLambda(this.Syntax, data, functionType, withDependencies, this.HasErrors);
104 references to UnboundLambda
Microsoft.CodeAnalysis.CSharp (104)
Binder\Binder.IdentifierUsedAsValueFinder.cs (3)
173UnboundLambda unboundLambda = enclosingBinder.AnalyzeAnonymousFunction(lambdaSyntax, BindingDiagnosticBag.Discarded); 178private static ExecutableCodeBinder CreateLambdaBodyBinder(Binder enclosingBinder, UnboundLambda unboundLambda) 540UnboundLambda unboundLambda = Binder.MakeQueryUnboundLambda(
Binder\Binder_Conversions.cs (2)
2276var unboundLambda = (UnboundLambda)source;
Binder\Binder_Expressions.cs (4)
2849GenerateAnonymousFunctionConversionError(diagnostics, operand.Syntax, (UnboundLambda)operand, targetType); 5478else if (argument is UnboundLambda unboundLambda) 7820var msgId = ((UnboundLambda)boundLeft).MessageID; 11689var msgId = ((UnboundLambda)receiver).MessageID;
Binder\Binder_Invocation.cs (2)
2163var unboundArgument = (UnboundLambda)argument;
Binder\Binder_Lambda.cs (4)
38private UnboundLambda AnalyzeAnonymousFunction( 256return UnboundLambda.Create(syntax, this, diagnostics.AccumulatesDependencies, returnRefKind, refCustomModifiers, returnType, parameterAttributes, refKinds, scopes, types, names, discardsOpt, parameterSyntaxListOpt, defaultValues, isAsync: isAsync, isStatic: isStatic); 365private UnboundLambda BindAnonymousFunction(AnonymousFunctionExpressionSyntax syntax, BindingDiagnosticBag diagnostics) 370var lambda = AnalyzeAnonymousFunction(syntax, diagnostics);
Binder\Binder_Operators.cs (1)
4120case UnboundLambda _:
Binder\Binder_Query.cs (21)
232var lambda = MakeQueryUnboundLambda(state.RangeVariableMap(), x, v, diagnostics.AccumulatesDependencies); 258var lambdaLeft = MakeQueryUnboundLambda(state.RangeVariableMap(), x, k, diagnostics.AccumulatesDependencies); 366var lambda = MakeQueryUnboundLambda(state.RangeVariableMap(), state.rangeVariable, where.Condition, diagnostics.AccumulatesDependencies); 406var outerKeySelectorLambda = MakeQueryUnboundLambda(state.RangeVariableMap(), state.rangeVariable, join.LeftExpression, diagnostics.AccumulatesDependencies); 410var innerKeySelectorLambda = MakeQueryUnboundLambda(QueryTranslationState.RangeVariableMap(x2), x2, join.RightExpression, diagnostics.AccumulatesDependencies); 424var resultSelectorLambda = MakeQueryUnboundLambda(state.RangeVariableMap(), ImmutableArray.Create(x1, x2), select.Expression, diagnostics.AccumulatesDependencies); 452var resultSelectorLambda = MakeQueryUnboundLambda(state.RangeVariableMap(), ImmutableArray.Create(x1, g), select.Expression, diagnostics.AccumulatesDependencies); 492var resultSelectorLambda = MakePairLambda(join, state, x1, x2, diagnostics.AccumulatesDependencies); 522var resultSelectorLambda = MakePairLambda(join, state, x1, g, diagnostics.AccumulatesDependencies); 567var lambda = MakeQueryUnboundLambda(state.RangeVariableMap(), state.rangeVariable, ordering.Expression, diagnostics.AccumulatesDependencies); 609var resultSelectorLambda = MakeQueryUnboundLambda(state.RangeVariableMap(), ImmutableArray.Create(x1, x2), select.Expression, diagnostics.AccumulatesDependencies); 656var resultSelectorLambda = MakePairLambda(from, state, x1, x2, diagnostics.AccumulatesDependencies); 692private UnboundLambda MakePairLambda(CSharpSyntaxNode node, QueryTranslationState state, RangeVariableSymbol x1, RangeVariableSymbol x2, bool withDependencies) 704var result = MakeQueryUnboundLambda(state.RangeVariableMap(), ImmutableArray.Create(x1, x2), node, bodyFactory, withDependencies); 757var lambda = MakeQueryUnboundLambda(state.RangeVariableMap(), ImmutableArray.Create(x), let.Expression, bodyFactory, diagnostics.AccumulatesDependencies); 831private UnboundLambda MakeQueryUnboundLambda(RangeVariableMap qvm, RangeVariableSymbol parameter, ExpressionSyntax expression, bool withDependencies) 836private UnboundLambda MakeQueryUnboundLambda(RangeVariableMap qvm, ImmutableArray<RangeVariableSymbol> parameters, ExpressionSyntax expression, bool withDependencies) 847private UnboundLambda MakeQueryUnboundLambdaWithCast(RangeVariableMap qvm, RangeVariableSymbol parameter, ExpressionSyntax expression, TypeSyntax castTypeSyntax, TypeWithAnnotations castType, bool withDependencies) 865private UnboundLambda MakeQueryUnboundLambda(RangeVariableMap qvm, ImmutableArray<RangeVariableSymbol> parameters, CSharpSyntaxNode node, LambdaBodyFactory bodyFactory, bool withDependencies) 870private static UnboundLambda MakeQueryUnboundLambda(CSharpSyntaxNode node, QueryUnboundLambdaState state, bool withDependencies) 874var lambda = new UnboundLambda(node, state, functionType: null, withDependencies, hasErrors: false) { WasCompilerGenerated = true };
Binder\Binder_QueryErrors.cs (2)
222var unbound = (UnboundLambda)arg;
Binder\Binder_Statements.cs (2)
2045UnboundLambda anonymousFunction, TypeSymbol targetType) 2374GenerateAnonymousFunctionConversionError(diagnostics, syntax, (UnboundLambda)operand, targetType);
Binder\Semantics\Conversions\ConversionsBase.cs (4)
1467private static LambdaConversionResult IsAnonymousFunctionCompatibleWithDelegate(UnboundLambda anonymousFunction, TypeSymbol type, CSharpCompilation compilation, bool isTargetExpressionTree) 1586private static LambdaConversionResult IsAnonymousFunctionCompatibleWithExpressionTree(UnboundLambda anonymousFunction, NamedTypeSymbol type, CSharpCompilation compilation) 1624public static LambdaConversionResult IsAnonymousFunctionCompatibleWithType(UnboundLambda anonymousFunction, TypeSymbol type, CSharpCompilation compilation) 1651return IsAnonymousFunctionCompatibleWithType((UnboundLambda)source, destination, compilation) == LambdaConversionResult.Success;
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (6)
1564UnboundLambda anonymousFunction = (UnboundLambda)source; 1618UnboundLambda anonymousFunction = (UnboundLambda)source; 3096var anonymousFunction = (UnboundLambda)source;
Binder\Semantics\OverloadResolution\OverloadResolution.cs (6)
2949var lambdaOpt = node as UnboundLambda; 3295BoundLambda lambda = ((UnboundLambda)node).BindForReturnTypeInference(d); 3520UnboundLambda lambdaOpt = node as UnboundLambda; 3683private bool CanDowngradeConversionFromLambdaToNeither(BetterResult currentResult, UnboundLambda lambda, TypeSymbol type1, TypeSymbol type2, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, bool fromTypeAnalysis)
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (2)
1102hadError |= ((UnboundLambda)argument).GenerateSummaryErrors(diagnostics); 1250((UnboundLambda)argument).GenerateAnonymousFunctionConversionError(diagnostics, parameterType);
BoundTree\BoundExpressionExtensions.cs (1)
168UnboundLambda unboundLambda => unboundLambda.FunctionType,
BoundTree\UnboundLambda.cs (12)
85public BoundLambda(SyntaxNode syntax, UnboundLambda unboundLambda, BoundBlock body, ReadOnlyBindingDiagnostic<AssemblySymbol> diagnostics, Binder binder, TypeSymbol? delegateType, InferredLambdaReturnType inferredReturnType) 205UnboundLambda node, Binder binder, TypeSymbol? delegateType, bool isAsync, ConversionsBase conversions) 406public static UnboundLambda Create( 428var functionType = FunctionTypeSymbol.CreateIfFeatureEnabled(syntax, binder, static (binder, expr) => ((UnboundLambda)expr).Data.InferDelegateType()); 430var lambda = new UnboundLambda(syntax, data, functionType, withDependencies, hasErrors: hasErrors); 444internal UnboundLambda WithNullabilityInfo(NullableWalker.VariableState nullableState, NullableWalker.GetterNullResilienceData? getterNullResilienceData) 447var lambda = new UnboundLambda(Syntax, data, FunctionType, WithDependencies, nullableState, getterNullResilienceData, HasErrors); 452internal UnboundLambda WithNoCache() 460var lambda = new UnboundLambda(Syntax, data, FunctionType, WithDependencies, _nullableState, _getterNullResilienceData, HasErrors); 538private UnboundLambda _unboundLambda = null!; // we would prefer this readonly, but we have an initialization cycle. 567public void SetUnboundLambda(UnboundLambda unbound) 588public UnboundLambda UnboundLambda => _unboundLambda;
Compilation\CSharpSemanticModel.cs (1)
2231var lambda = ((UnboundLambda)boundExpr).BindForErrorRecovery();
Compilation\MemberSemanticModel.cs (3)
1784boundInnerLambdaOrQuery = ((UnboundLambda)boundInnerLambdaOrQuery).BindForErrorRecovery(); 1849var unbound = (UnboundLambda)node;
Compilation\MemberSemanticModel.NodeMapBuilder.cs (1)
171current = ((UnboundLambda)node).BindForErrorRecovery();
Compiler\MethodCompiler.cs (1)
2361public override BoundNode? VisitUnboundLambda(UnboundLambda node)
FlowAnalysis\AbstractFlowPass.cs (1)
3248public override BoundNode VisitUnboundLambda(UnboundLambda node)
FlowAnalysis\NullableWalker.cs (4)
8623static UnboundLambda getUnboundLambda(BoundLambda expr, VariableState variableState, GetterNullResilienceData? getterNullResilienceData) 9332UnboundLambda unboundLambda = lambda.UnboundLambda; 10572var unboundLambda = lambda.UnboundLambda; 10578public override BoundNode? VisitUnboundLambda(UnboundLambda node)
FlowAnalysis\NullableWalker.DebugVerifier.cs (1)
193public override BoundNode? VisitUnboundLambda(UnboundLambda node)
FlowAnalysis\ReadWriteWalker.cs (1)
283public override BoundNode VisitUnboundLambda(UnboundLambda node)
Generated\BoundNodes.xml.Generated.cs (15)
7621public BoundLambda(SyntaxNode syntax, UnboundLambda unboundLambda, MethodSymbol symbol, BoundBlock body, ReadOnlyBindingDiagnostic<AssemblySymbol> diagnostics, Binder binder, TypeSymbol? type, bool hasErrors = false) 7637public UnboundLambda UnboundLambda { get; } 7647public BoundLambda Update(UnboundLambda unboundLambda, MethodSymbol symbol, BoundBlock body, ReadOnlyBindingDiagnostic<AssemblySymbol> diagnostics, Binder binder, TypeSymbol? type) 7691public UnboundLambda Update(UnboundLambdaState data, FunctionTypeSymbol? functionType, Boolean withDependencies) 7695var result = new UnboundLambda(this.Syntax, data, functionType, withDependencies, this.HasErrors); 9300return VisitUnboundLambda((UnboundLambda)node, arg); 9572public virtual R VisitUnboundLambda(UnboundLambda node, A arg) => this.DefaultVisit(node, arg); 9808public virtual BoundNode? VisitUnboundLambda(UnboundLambda node) => this.DefaultVisit(node); 10710public override BoundNode? VisitUnboundLambda(UnboundLambda node) => null; 12189UnboundLambda unboundLambda = node.UnboundLambda; 12194public override BoundNode? VisitUnboundLambda(UnboundLambda node) 14754UnboundLambda unboundLambda = node.UnboundLambda; 14770public override BoundNode? VisitUnboundLambda(UnboundLambda node) 14773UnboundLambda updatedNode; 17016public override TreeDumperNode VisitUnboundLambda(UnboundLambda node, object? arg) => new TreeDumperNode("unboundLambda", null, new TreeDumperNode[]
Operations\CSharpOperationFactory.cs (2)
86return CreateUnboundLambdaOperation((UnboundLambda)boundNode); 984private IOperation CreateUnboundLambdaOperation(UnboundLambda unboundLambda)
Symbols\Source\LambdaSymbol.cs (2)
47UnboundLambda unboundLambda, 329UnboundLambda unboundLambda,