Skip to content

Commit 2517e7c

Browse files
Copilotdadhi
andauthored
Fix block body child linking for parameter declarations
Agent-Logs-Url: https://github.com/dadhi/FastExpressionCompiler/sessions/90049206-1092-4941-aabf-e1947566e4bc Co-authored-by: dadhi <39516+dadhi@users.noreply.github.com>
1 parent acf1789 commit 2517e7c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/FastExpressionCompiler.LightExpression/FlatExpression.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ public int Block(Type type, IEnumerable<int> variables, params int[] expressions
359359
}
360360
ChildList bodyChildren = default;
361361
for (var i = 0; i < expressions.Length; ++i)
362-
bodyChildren.Add(expressions[i]);
362+
bodyChildren.Add(CloneChild(expressions[i]));
363363
children.Add(AddChildListNode(in bodyChildren));
364364
var blockIndex = AddFactoryExpressionNode(type ?? Nodes[expressions[expressions.Length - 1]].Type, null, ExpressionType.Block, in children);
365365
for (var i = 0; i < variableDeclarations.Count; ++i)

0 commit comments

Comments
 (0)