Ast list nodes
This commit is contained in:
@@ -104,7 +104,7 @@ end;
|
||||
|
||||
function TTestAstBinder.Unwrap(const Node: IAstNode): IAstNode;
|
||||
begin
|
||||
if (Node.Kind = akBlockExpression) and (Length(Node.AsBlockExpression.Expressions) = 1) then
|
||||
if (Node.Kind = akBlockExpression) and (Node.AsBlockExpression.Expressions.Count = 1) then
|
||||
Result := Node.AsBlockExpression.Expressions[0]
|
||||
else
|
||||
Result := Node;
|
||||
@@ -236,6 +236,7 @@ begin
|
||||
Assert.IsFalse(log.HasErrors);
|
||||
|
||||
lambda := bound.AsLambdaExpression;
|
||||
// Access parameter list via index
|
||||
Assert.AreEqual<Integer>(1, lambda.Parameters[0].Address.SlotIndex); // Slot 0 is reserved for <self>
|
||||
end;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user