You'd have to put base.destructor() before it.fxm wrote:If a 'Constructor(Byref As Parent)' is defined in the base-type 'Parent', we can replace:
Cast(Parent, This) = rhs
with:
Base.Constructor(rhs)
I think the only case where a .constructor() doesn't require an explicit .destructor() is for the initialisation of fields that have been marked as = any in the type declaration. I think that's something we'd want to do better if we could find a good syntax for it.
Without direct access to the base, the cast-to-parent is the best solution.
Presumably this situation also occurs for any operator, not just assignments. I don't think constructor hacks can't be used in the same way there.