Sorry for double post, just for correction

On Fri, Sep 11, 2009 at 7:40 PM, Matthias K. <maka...@googlemail.com> wrote:
> Hi,
>
> Its quite a while since i last used the "as" Keyword but it seems to
> be broke somehow.
> In the following code i've got a compiler error: Illegal parameter
> list in the line with the star,
> at the opening Brace. A Cast ( T8BSetObject(ASet).FSet ... ) works fine.
> --
>
> type
>  TBaseSet = set of Char;
>  TSetObject = class
>    public
>      procedure Union( ASet: TSetObject ); virtual; abstract;
>  end;
>
>  T8BSetObject = class( TSetObject )
>    private
>      FSet: TBaseSet;
>    public
>      procedure Union( ASet: TSetObject ); override;
>  end;
> ..
> procedure T8BSetObject.Union( ASet: TSetObject ); override;
> begin
> *  Result := FSet + ( ASet as T8BSetObject).FSet;
FSet := FSet + (ASet as T8BSetObject );
.. it was just a fast rewrite of the actual code, dont mind other
faults. the problem line is here
> end;
>
> --
>
> regards,
>  maka
>
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to