Skip to content

Delphi - Inline variable enumerator breaks syntax tree #15

@lystakata

Description

@lystakata

In recent versions of Delphi an inline variable can be used when enumerating a container.

for var Item in AList do
begin
  WriteLn(Item);
end;

This pattern currently breaks the syntax tree. Please add capturing as foreach.

This pattern seems to already work with an inline variable:

for var AValue := 0 to 12 do
  Inc(i);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions