[fpc-devel] Local types and protected visibility
Alexander Klenin
klenin at gmail.com
Tue Sep 6 10:13:01 CEST 2011
As reported in the Russian forum:
http://freepascal.ru/forum/viewtopic.php?f=1&t=7362
the following code:
{$mode objfpc}
uses
Classes;
type
TMyClass=class
private
type
TMyMemoryStream=class(TCustomMemoryStream) end;
public
procedure MyProc;
end;
procedure TMyClass.MyProc;
begin
with TMyMemoryStream.Create
do SetPointer(nil,0)
end;
begin
end.
Causes 'Error: Identifier not found "SetPointer"'.
Moving TMyMemoryStream declaration out of the TMyClass works.
--
Alexander S. Klenin
More information about the fpc-devel
mailing list