[fpc-devel] Type definition

Vincent Snijders vsnijders at quicknet.nl
Sun Mar 5 09:02:09 CET 2006


Paul Davidson wrote:
> unit aUnit;
> interface
>     type
>         aType = ( at_First, at_aaa, at_bbb, at_Last );
> 
>         aObj = class
>             aVar : aType
> 
> 
> 
> unit bUnit;
> interface
>     uses aUnit;
>     type
>         bObj = class( aObj )
> 
> 
> unit cUnit
> interface
>     uses bUnit;

I think some Pascal dialect have
   reuse bUnit;
Then all bUnit is used, pull the units in the interfaces uses clause.

>     type
>         cObj = class( bObj )
> implementation
>     aVar := at_Last;   <----------- ERROR!
> 
> The implementation of cUnit requires a USE aUnit; in order to compile 
> since at_last is no longer visible.
> 
>        



More information about the fpc-devel mailing list