ITupleNode signature change
This commit is contained in:
@@ -195,7 +195,6 @@ function TUpvalueAnalyzer.VisitLambdaExpression(const Node: IAstNode): IAstNode;
|
||||
var
|
||||
L: ILambdaExpressionNode;
|
||||
i: Integer;
|
||||
paramTuple: ITupleNode;
|
||||
begin
|
||||
L := Node.AsLambdaExpression;
|
||||
|
||||
@@ -205,11 +204,13 @@ begin
|
||||
// 2. Register parameters (they mask outer variables)
|
||||
// We pass 'nil' as the node because we currently don't box parameters,
|
||||
// but we must ensure Resolve() finds them so we don't accidentally box a shadowed variable.
|
||||
paramTuple := L.Parameters;
|
||||
for i := 0 to paramTuple.Count - 1 do
|
||||
|
||||
// Optimized: Access Elements array directly
|
||||
var paramElements := L.Parameters.Elements;
|
||||
for i := 0 to High(paramElements) do
|
||||
begin
|
||||
if paramTuple.Items[i].Kind = akIdentifier then
|
||||
FCurrentScope.Define(paramTuple.Items[i].AsIdentifier.Name, nil);
|
||||
if paramElements[i].Kind = akIdentifier then
|
||||
FCurrentScope.Define(paramElements[i].AsIdentifier.Name, nil);
|
||||
end;
|
||||
|
||||
// 3. Visit Body
|
||||
|
||||
Reference in New Issue
Block a user