Am 08.05.2015 23:56 schrieb "Martin Frb" <laza...@mfriebe.de>:
>
> What are the scoping rules?
>
> Example:
>
>   TLazStorageMemBase = object
>   private
>   const
>     CNT_OFFS  = SizeOf(Pointer);
>     DATA_OFFS = CNT_OFFS + (2 * SizeOf(Integer));
>   private
>     FMem: PByte;
>     function GetCapacity: Integer; inline;
>     function GetCount: Integer; inline;
> .....
>   end;
>
>   generic TLazGenStorageMem<T> = object(TLazStorageMemBase)
> ...
>     property Capacity: Integer read GetCapacity write SetCapacity;
>     property Count: Integer read GetCount;
>   end;
>
>
> If I specialize TLazGenStorageMem in an other unit, then I get tons of
errors, because all the privet symbols are not accessible.
>
> Is that intended?

I'd say that this is not intended, but I'll need to retest this with Delphi.

You forgot one very important piece of information though: what compiler
version are you using? If it's 2.6.x, then please test with 3.0.1 or 3.1.1
as there were /many/ changes since then and 2.6.4's generic support is
nothing compared to what we now have (despite there still being quite some
bugs and missing features).

Regards,
Sven
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to