tw18127.pp 493 B

12345678910111213141516171819202122232425262728293031
  1. { %norun }
  2. program tw18127;
  3. {$mode objfpc}{$H+}
  4. type
  5. TBar = class
  6. public
  7. type
  8. TSomeInt = integer;
  9. end;
  10. TFoo1 = class(TBar)
  11. public
  12. const
  13. one = 1;
  14. type
  15. TFoo2 = TSomeInt; // was error: Identifier not found "TSomeInt"
  16. TFoo3 = class
  17. function Func: TFoo2;
  18. end;
  19. end;
  20. function TFoo1.TFoo3.Func: TFoo2; // was error: Identifier not found "TFoo2"
  21. begin
  22. Result := one; // was error: Identifier not found "one"
  23. end;
  24. begin
  25. end.