Program Chief39b;
type
Coord = array [1 .. 2] of Integer;
TCoord = Coord;

type bar = object
  function foo: tcoord;
end;

Function bar.foo : TCoord;
Begin
  Result[1] := 0;
  Result[2] := 25;
End;

Var
i : integer;
b : bar;
begin
  i := b.foo[2]; // GPC barfs here
  if i = 25 then writeln ('OK') else writeln ('failed ', i)
end.
