nested types visibility: constants and function results
Original Reporter info from Mantis: Giel
-
Reporter name:
Original Reporter info from Mantis: Giel
- Reporter name:
Description:
0017952 fixed a visibility issue for method parameters. These two units show the same problem for function results and constants respectively:
unit unit1;
interface
type
TFoo1 = class
public
type
TFoo2 = object
end;
TFoo3 = object
function Func: TFoo2;
end;
end;
implementation
function TFoo1.TFoo3.Func: TFoo2; //Unit1.pas(18,33) Error: Identifier not found "TFoo2"
//TFoo1.TFoo2 does work
begin
end;
end.
unit unit1;
interface
type
TFoo1 = class
const
one = 1;
type
TFoo3 = object
procedure Proc;
end;
end;
implementation
procedure TFoo1.TFoo3.Proc;
var
i: integer;
begin
i := one; //Error: Identifier not found "one"
//TFoo1.one does work
end;
end.
Mantis conversion info:
- Mantis ID: 18127
- Fixed in version: 2.6.0
- Fixed in revision: 16491 (#2155dadf)