mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 17:28:14 +02:00

- don't allow operator enumerator with non object/class/interface result type - add some test from Alexander S. Klenin (issue #0014990) git-svn-id: trunk@14043 -
15 lines
170 B
ObjectPascal
15 lines
170 B
ObjectPascal
{ %FAIL}
|
|
{$mode objfpc}
|
|
{$apptype console}
|
|
|
|
operator enumerator(a: Integer): Integer;
|
|
begin
|
|
Result := 0;
|
|
end;
|
|
|
|
var
|
|
i: Integer;
|
|
begin
|
|
for i in 1 do Writeln(i);
|
|
end.
|