<p>Am 31.08.2017 15:55 schrieb "Ondrej Pokorny" <<a href="mailto:lazarus@kluug.net">lazarus@kluug.net</a>>:<br>
><br>
> On 31.08.2017 14:55, Sven Barth via fpc-devel wrote:<br>
>><br>
>><br>
>> > Yeah, they might enable record helper inheritance for example :P (Record helper inheritance was documented to work for about 7 years since Delphi 2007 until XE6 <a href="http://docwiki.embarcadero.com/RADStudio/XE6/en/Class_and_Record_Helpers_(Delphi)">http://docwiki.embarcadero.com/RADStudio/XE6/en/Class_and_Record_Helpers_(Delphi)</a> <<a href="http://docwiki.embarcadero.com/RADStudio/XE6/en/Class_and_Record_Helpers_%28Delphi%29">http://docwiki.embarcadero.com/RADStudio/XE6/en/Class_and_Record_Helpers_%28Delphi%29</a>> ).<br>
>><br>
>> ><br>
>><br>
>> Huh? I had developed the feature while testing with Delphi XE and there record helpers did not support inheritance, only class helpers did. So as long as you don't provide prove I'd say that this is a documentation bug.<br>
>><br>
><br>
> That's exactly what I say: record helpers don't support inheritance but the documentation (until XE6) says nothing about this restriction, on the contrary. Only in XE7 they added the "It [the ancestor list] can be specified only for class helper." line. See:<br>
><br>
> <a href="http://docwiki.embarcadero.com/RADStudio/XE6/en/Class_and_Record_Helpers_(Delphi)">http://docwiki.embarcadero.com/RADStudio/XE6/en/Class_and_Record_Helpers_(Delphi)</a><br>
> <a href="http://docwiki.embarcadero.com/RADStudio/XE7/en/Class_and_Record_Helpers_(Delphi)">http://docwiki.embarcadero.com/RADStudio/XE7/en/Class_and_Record_Helpers_(Delphi)</a><br>
><br>
> It is a matter of point of view if it was a documentation bug or a compiler bug. Embarcadero shared your opinion with "documentation bug". (My personal opinion is that they just forgot about inheritance when they implemented record helpers and then instead of fixing the compiler they fixed the docs - yeah because it's easier.)</p>
<p>No, I don't think they thought this way. Class and record helpers weren't largely advertised back when they were introduced. They even had the note that one shouldn't use them for own implementations. And for record helpers they modelled them after records. If I remember correctly the "protected" section isn't allowed in record helpers either, because it isn't allowed in records.</p>
<p>> +++++<br>
><br>
> I remember a compiler bug in class destructor order call in Delphi: <a href="https://stackoverflow.com/questions/19332847/delphi-class-variable-going-out-of-scope-before-class-destructor-is-called">https://stackoverflow.com/questions/19332847/delphi-class-variable-going-out-of-scope-before-class-destructor-is-called</a><br>
><br>
> There were several issue reports about it in Embarcadero Quality Central (which is now down, so I can't provide the links), all resolved as "won't fix". Embarcadero always claimed this was by design.<br>
><br>
> But when they introduced ARC they suddendly couldn't justify the design flaw because consequently class objects were not available in class destructors in ARC mode but they were available in non-ARC mode. So they decided to fix the order just like lots of people requested from the very beginning. IMO it was VERY embarrassing for Embarcadero.<br>
><br>
> By the way, FPC is affected by the very same bug: <a href="https://mantis.freepascal.org/view.php?id=29334">https://mantis.freepascal.org/view.php?id=29334</a> .<br>
></p>
<p>That should get solved once I reworked the unit initialization which is the last real blocker for dynamically loading packages.</p>
<p>Regards,<br>
Sven</p>