fpc/tests/test/tforin22.pp
paul 2f0cde4625 compiler:
- don't find MoveNext functions with the required arguments
  - add some test from Alexander S. Klenin
(issue #0014990)

git-svn-id: trunk@14044 -
2009-11-04 13:21:10 +00:00

28 lines
387 B
ObjectPascal

{ %FAIL}
{$mode objfpc}
{$apptype console}
type
T = class
F: Integer;
function MoveNext(a: Integer): Boolean;
property Current: Integer read F;
end;
function T.MoveNext(a: Integer): Boolean;
begin
Result := true;
end;
operator enumerator(a: Integer): T;
begin
Result := T.Create;
Result.F := a;
end;
var
i: Integer;
begin
for i in 1 do Writeln(i);
end.