Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
fpc-src / usr / share / fpcsrc / 3.0.0 / tests / test / tforin10.pp
Size: Mime:
{ %FAIL}

// test that it is imposible to use non-valid enumerator operator

program tforin10;

{$mode objfpc}{$H+}
{$apptype console}

type
  TSomeClass = class
  end;

  TSomeClassEnumerator = class
  end;

operator enumerator(s1, s2: TSomeClass): TSomeClassEnumerator;
begin
  Result := nil;
end;

var
  s: TSomeClass;
  c: char;
begin
  for c in s do
    write(c);
end.