<p>Am 17.07.2017 18:24 schrieb "Ryan Joseph" <<a href="mailto:ryan@thealchemistguild.com">ryan@thealchemistguild.com</a>>:<br>
><br>
> I’m trying to find a way to extend generic records since (as far as I know) there is no subclassing of records. I could use variant records here but these don’t work with generics so I tried record helpers and properties to basically rename the x/y variables in TVec2 but I get errors on the width/height properties. Is there a workaround for this?<br>
><br>
> type<br>
> generic TVec2<T> = record<br>
> public<br>
> x, y: T;<br>
> end;<br>
> type<br>
> TSize = specialize TVec2<TFloat>;<br>
> type<br>
> TVec2Size = record helper for TSize<br>
> property Width: TFloat read x write x;<br>
> property Height: TFloat read y write y;<br>
> end;</p>
<p>I'll need to check whether Delphi allows that for helpers (doesn't matter whether the extended type is a specialization or not).</p>
<p>Regards,<br>
Sven</p>