[fpc-devel] Allow record helper inheritance in Delphi mode

Ondrej Pokorny lazarus at kluug.net
Tue Aug 29 19:23:16 CEST 2017


On 29.08.2017 18:54, Sven Barth via fpc-devel wrote:
>
> Am 29.08.2017 17:39 schrieb "Ondrej Pokorny" <lazarus at kluug.net 
> <mailto:lazarus at kluug.net>>:
> > So yes, your description of {$modeswitch typehelpers} makes sense 
> for 3.0.0 but not for trunk any more. So what is your intention - 
> 3.0.0 behavior or trunk behavior?
>
> Maybe it would indeed make more sense to adjust the meaning of the 
> typehelpers modeswitch in mode Delphi... Namely that it enabled the 
> "type helper" syntax including the inheritance. But the record helpers 
> are left as is... (btw: a type helper for a primitive type can inherit 
> from a record helper of the same type, internally they're all the same)
>
> This way we won't need a new modeswitch...
>

Looks OK to me. Actually I only will join RecordHelperInheritance and 
TypeHelpers switch from delphi-helpers-2.patch in 
https://mantis.freepascal.org/view.php?id=32355. It should be easy to do.

+ It means that record helper inheritance will be enabled with 
typehelpers as well because if I am not mistaken currently the compiler 
cannot distinguish between a type helper and record helper acting on a 
record. (IMO it is even a plus.)

Ondrej
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20170829/fd9576d9/attachment.html>


More information about the fpc-devel mailing list