mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-09 07:08:29 +02:00

- don't find MoveNext functions with the required arguments - add some test from Alexander S. Klenin (issue #0014990) git-svn-id: trunk@14044 -
28 lines
387 B
ObjectPascal
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.
|