ITupleNode signature change

This commit is contained in:
Michael Schimmel
2026-01-06 11:37:18 +01:00
parent 264314cd93
commit 40ed51aef8
23 changed files with 340 additions and 270 deletions
+3 -3
View File
@@ -135,14 +135,14 @@ end;
function TPurityAnalyzer.VisitTuple(const Node: IAstNode): Boolean;
var
i: Integer;
T: ITupleNode;
begin
T := Node.AsTuple;
// A tuple is pure if ALL its elements are pure.
for i := 0 to T.Count - 1 do
// Optimization: Use Elements array directly
for var item in T.Elements do
begin
if not IsNodePure(T.Items[i]) then
if not IsNodePure(item) then
exit(False);
end;
Result := True;