5 instantiations of UnboundLambda
Microsoft.CodeAnalysis.CSharp (5)
Binder\Binder_Query.cs (1)
868var lambda = new UnboundLambda(node, state, functionType: null, withDependencies, hasErrors: false) { WasCompilerGenerated = true };
BoundTree\UnboundLambda.cs (3)
414var lambda = new UnboundLambda(syntax, data, functionType, withDependencies, hasErrors: hasErrors); 430var lambda = new UnboundLambda(Syntax, data, FunctionType, WithDependencies, nullableState, HasErrors); 443var lambda = new UnboundLambda(Syntax, data, FunctionType, WithDependencies, _nullableState, HasErrors);
Generated\BoundNodes.xml.Generated.cs (1)
7348var result = new UnboundLambda(this.Syntax, data, functionType, withDependencies, this.HasErrors);
105 references to UnboundLambda
Microsoft.CodeAnalysis.CSharp (105)
Binder\Binder.IdentifierUsedAsValueFinder.cs (3)
173UnboundLambda unboundLambda = enclosingBinder.AnalyzeAnonymousFunction(lambdaSyntax, BindingDiagnosticBag.Discarded); 178private static ExecutableCodeBinder CreateLambdaBodyBinder(Binder enclosingBinder, UnboundLambda unboundLambda) 531UnboundLambda unboundLambda = Binder.MakeQueryUnboundLambda(
Binder\Binder_Conversions.cs (2)
702var unboundLambda = (UnboundLambda)source;
Binder\Binder_Expressions.cs (4)
2516GenerateAnonymousFunctionConversionError(diagnostics, operand.Syntax, (UnboundLambda)operand, targetType); 4533else if (argument is UnboundLambda unboundLambda) 6578var msgId = ((UnboundLambda)boundLeft).MessageID; 9513var msgId = ((UnboundLambda)receiver).MessageID;
Binder\Binder_Invocation.cs (3)
977case UnboundLambda unboundLambda: 1698var unboundArgument = (UnboundLambda)argument;
Binder\Binder_Lambda.cs (4)
35private UnboundLambda AnalyzeAnonymousFunction( 246return UnboundLambda.Create(syntax, this, diagnostics.AccumulatesDependencies, returnRefKind, returnType, parameterAttributes, refKinds, scopes, types, names, discardsOpt, parameterSyntaxList, defaultValues, isAsync: isAsync, isStatic: isStatic, hasParamsArray: hasParamsArray); 348private UnboundLambda BindAnonymousFunction(AnonymousFunctionExpressionSyntax syntax, BindingDiagnosticBag diagnostics) 353var lambda = AnalyzeAnonymousFunction(syntax, diagnostics);
Binder\Binder_Operators.cs (1)
2490case 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); 655var resultSelectorLambda = MakePairLambda(from, state, x1, x2, diagnostics.AccumulatesDependencies); 686private UnboundLambda MakePairLambda(CSharpSyntaxNode node, QueryTranslationState state, RangeVariableSymbol x1, RangeVariableSymbol x2, bool withDependencies) 698var result = MakeQueryUnboundLambda(state.RangeVariableMap(), ImmutableArray.Create(x1, x2), node, bodyFactory, withDependencies); 751var lambda = MakeQueryUnboundLambda(state.RangeVariableMap(), ImmutableArray.Create(x), let.Expression, bodyFactory, diagnostics.AccumulatesDependencies); 825private UnboundLambda MakeQueryUnboundLambda(RangeVariableMap qvm, RangeVariableSymbol parameter, ExpressionSyntax expression, bool withDependencies) 830private UnboundLambda MakeQueryUnboundLambda(RangeVariableMap qvm, ImmutableArray<RangeVariableSymbol> parameters, ExpressionSyntax expression, bool withDependencies) 841private UnboundLambda MakeQueryUnboundLambdaWithCast(RangeVariableMap qvm, RangeVariableSymbol parameter, ExpressionSyntax expression, TypeSyntax castTypeSyntax, TypeWithAnnotations castType, bool withDependencies) 859private UnboundLambda MakeQueryUnboundLambda(RangeVariableMap qvm, ImmutableArray<RangeVariableSymbol> parameters, CSharpSyntaxNode node, LambdaBodyFactory bodyFactory, bool withDependencies) 864private static UnboundLambda MakeQueryUnboundLambda(CSharpSyntaxNode node, QueryUnboundLambdaState state, bool withDependencies) 868var 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)
1970UnboundLambda anonymousFunction, TypeSymbol targetType) 2292GenerateAnonymousFunctionConversionError(diagnostics, syntax, (UnboundLambda)operand, targetType);
Binder\Semantics\Conversions\ConversionsBase.cs (4)
1392private static LambdaConversionResult IsAnonymousFunctionCompatibleWithDelegate(UnboundLambda anonymousFunction, TypeSymbol type, bool isTargetExpressionTree) 1510private static LambdaConversionResult IsAnonymousFunctionCompatibleWithExpressionTree(UnboundLambda anonymousFunction, NamedTypeSymbol type) 1548public static LambdaConversionResult IsAnonymousFunctionCompatibleWithType(UnboundLambda anonymousFunction, TypeSymbol type) 1575return IsAnonymousFunctionCompatibleWithType((UnboundLambda)source, destination) == LambdaConversionResult.Success;
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (6)
1441UnboundLambda anonymousFunction = (UnboundLambda)source; 1495UnboundLambda anonymousFunction = (UnboundLambda)source; 2886var anonymousFunction = (UnboundLambda)source;
Binder\Semantics\OverloadResolution\OverloadResolution.cs (6)
2434var lambdaOpt = node as UnboundLambda; 2545BoundLambda lambda = ((UnboundLambda)node).BindForReturnTypeInference(d); 2760UnboundLambda lambdaOpt = node as UnboundLambda; 2907private bool CanDowngradeConversionFromLambdaToNeither(BetterResult currentResult, UnboundLambda lambda, TypeSymbol type1, TypeSymbol type2, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, bool fromTypeAnalysis)
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (2)
1048hadError |= ((UnboundLambda)argument).GenerateSummaryErrors(diagnostics); 1183((UnboundLambda)argument).GenerateAnonymousFunctionConversionError(diagnostics, parameterType);
BoundTree\BoundExpressionExtensions.cs (1)
140UnboundLambda unboundLambda => unboundLambda.FunctionType,
BoundTree\UnboundLambda.cs (12)
82public BoundLambda(SyntaxNode syntax, UnboundLambda unboundLambda, BoundBlock body, ImmutableBindingDiagnostic<AssemblySymbol> diagnostics, Binder binder, TypeSymbol? delegateType, InferredLambdaReturnType inferredReturnType) 193UnboundLambda node, Binder binder, TypeSymbol? delegateType, bool isAsync, ConversionsBase conversions) 390public static UnboundLambda Create( 412var functionType = FunctionTypeSymbol.CreateIfFeatureEnabled(syntax, binder, static (binder, expr) => ((UnboundLambda)expr).Data.InferDelegateType()); 414var lambda = new UnboundLambda(syntax, data, functionType, withDependencies, hasErrors: hasErrors); 427internal UnboundLambda WithNullableState(NullableWalker.VariableState nullableState) 430var lambda = new UnboundLambda(Syntax, data, FunctionType, WithDependencies, nullableState, HasErrors); 435internal UnboundLambda WithNoCache() 443var lambda = new UnboundLambda(Syntax, data, FunctionType, WithDependencies, _nullableState, HasErrors); 490private UnboundLambda _unboundLambda = null!; // we would prefer this readonly, but we have an initialization cycle. 519public void SetUnboundLambda(UnboundLambda unbound) 540public UnboundLambda UnboundLambda => _unboundLambda;
Compilation\CSharpSemanticModel.cs (1)
2231var lambda = ((UnboundLambda)boundExpr).BindForErrorRecovery();
Compilation\MemberSemanticModel.cs (3)
1736boundInnerLambdaOrQuery = ((UnboundLambda)boundInnerLambdaOrQuery).BindForErrorRecovery(); 1801var unbound = (UnboundLambda)node;
Compilation\MemberSemanticModel.NodeMapBuilder.cs (1)
172current = ((UnboundLambda)node).BindForErrorRecovery();
Compiler\MethodCompiler.cs (1)
2237public override BoundNode? VisitUnboundLambda(UnboundLambda node)
FlowAnalysis\AbstractFlowPass.cs (1)
3020public override BoundNode VisitUnboundLambda(UnboundLambda node)
FlowAnalysis\NullableWalker.cs (4)
7165static UnboundLambda getUnboundLambda(BoundLambda expr, VariableState variableState) 7811UnboundLambda unboundLambda = lambda.UnboundLambda; 8995var unboundLambda = lambda.UnboundLambda; 9001public override BoundNode? VisitUnboundLambda(UnboundLambda node)
FlowAnalysis\NullableWalker.DebugVerifier.cs (1)
127public override BoundNode? VisitUnboundLambda(UnboundLambda node)
FlowAnalysis\ReadWriteWalker.cs (1)
250public override BoundNode VisitUnboundLambda(UnboundLambda node)
Generated\BoundNodes.xml.Generated.cs (15)
7274public BoundLambda(SyntaxNode syntax, UnboundLambda unboundLambda, LambdaSymbol symbol, BoundBlock body, ImmutableBindingDiagnostic<AssemblySymbol> diagnostics, Binder binder, TypeSymbol? type, bool hasErrors = false) 7290public UnboundLambda UnboundLambda { get; } 7300public BoundLambda Update(UnboundLambda unboundLambda, LambdaSymbol symbol, BoundBlock body, ImmutableBindingDiagnostic<AssemblySymbol> diagnostics, Binder binder, TypeSymbol? type) 7344public UnboundLambda Update(UnboundLambdaState data, FunctionTypeSymbol? functionType, Boolean withDependencies) 7348var result = new UnboundLambda(this.Syntax, data, functionType, withDependencies, this.HasErrors); 8897return VisitUnboundLambda((UnboundLambda)node, arg); 9161public virtual R VisitUnboundLambda(UnboundLambda node, A arg) => this.DefaultVisit(node, arg); 9389public virtual BoundNode? VisitUnboundLambda(UnboundLambda node) => this.DefaultVisit(node); 10261public override BoundNode? VisitUnboundLambda(UnboundLambda node) => null; 11551UnboundLambda unboundLambda = node.UnboundLambda; 11556public override BoundNode? VisitUnboundLambda(UnboundLambda node) 14006UnboundLambda unboundLambda = node.UnboundLambda; 14022public override BoundNode? VisitUnboundLambda(UnboundLambda node) 14025UnboundLambda updatedNode; 16191public override TreeDumperNode VisitUnboundLambda(UnboundLambda node, object? arg) => new TreeDumperNode("unboundLambda", null, new TreeDumperNode[]
Operations\CSharpOperationFactory.cs (2)
86return CreateUnboundLambdaOperation((UnboundLambda)boundNode); 978private IOperation CreateUnboundLambdaOperation(UnboundLambda unboundLambda)
Symbols\Source\LambdaSymbol.cs (2)
43UnboundLambda unboundLambda, 301UnboundLambda unboundLambda,