Am 23.08.2017 16:01 schrieb "Anthony Walter" <sys...@gmail.com>:
>
> Marco, it doesn't work that way.
>
> Type helpers simply allow you to extend an existing type with new methods
and/or properties. When you declare a type helper you extend all instances
of said type given that:
>
> A) You 'use' the unit declaring the type helper in some other unit.
> B) No other unit you're using also defines a type helper for that same
type. Only one type helper per type allowed.
>

To be more precise: the last helper in scope simply wins. There is no error
if multiple ones are in scope. Also one can cheat a bit by having one's own
helper inherit from another helper of the same type ;)
Though I should mention that it's on my list to implement support for
multiple helpers. I just need to be sure about the resolution rules :)

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

Reply via email to