Skip to content

Commit f089ff5

Browse files
committed
docs: explain runtime System expression values in Light invocation
1 parent be03023 commit f089ff5

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎src/FastExpressionCompiler.LightExpression/Expression.cs‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1246,6 +1246,9 @@ public static ElementInit ElementInit(MethodInfo addMethod, IEnumerable<Expressi
12461246
ElementInit(addMethod, arguments.AsReadOnlyList());
12471247

12481248
[RequiresUnreferencedCode(Trimming.Message)]
1249+
// The outer tree still consists of LightExpression nodes. A parameter or constant
1250+
// may hold a System Expression<TDelegate> as runtime data; Invoke compiles that
1251+
// value and invokes its delegate. This does not mix System nodes into the tree.
12491252
private static Type GetInvocationReturnType(Expression expression) =>
12501253
expression is UnaryExpression quote && quote.NodeType == ExpressionType.Quote && quote.Operand is LambdaExpression lambda
12511254
? lambda.ReturnType

0 commit comments

Comments
 (0)