> On Jun 10, 2019, at 2:26 PM, Sven Barth via fpc-devel
> <[email protected]> wrote:
>
> Also FPC doesn’t have something “self” but for the class level so you need to
> cast the return value. Btw adding “ClassSelf” is something I’ve wanted for a
> while, so I can reference the class type within the class declaration.
>
> What are you talking about here?
>
Like this. I would prefer there being a “ClassSelf” type or something which
acted as TSelf.
type
TRecord = record
public type
TSelf = TRecord;
public
class operator + (left: TSelf; right: integer): TSelf;
class operator + (left: TSelf; right: integer): TSelf;
class operator - (left: TSelf; right: integer): TSelf;
class operator * (left: TSelf; right: integer): TSelf;
class operator / (left: TSelf; right: integer): TSelf;
class operator ** (left: TSelf; right: integer): TSelf;
class operator div (left: TSelf; right: integer): TSelf;
class operator mod (left: TSelf; right: integer): TSelf;
Regards,
Ryan Joseph
_______________________________________________
fpc-devel maillist - [email protected]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel