So part of the issue was that I was mixing `= object of RootObj` and `{.pure, inheritable.}`.
But now I am having the following issue. I have: type NCollectionHandle*[T] {.importcpp: "NCollection_Handle<\'0>", header: "NCollection_Handle.hxx", bycopy.} = object of HandleStandardTransient Run When I compile this, I get the error: Error: inheritance only works with non-final objects; for HandleStandardTransient to be inheritable it must be 'object of RootObj' instead of 'object' Run The way in which I have define this is: type Handle*[T] {.importcpp: "opencascade::handle<\'0>", header: "Standard_Handle.hxx", bycopy, pure, inheritable.} = object [...] type StandardTransient* {.importcpp: "Standard_Transient", header: "Standard_Transient.hxx", bycopy, pure, inheritable.} = object [...] type HandleStandardTransient* = Handle[StandardTransient] Run If I remove `pure,inheritable` from `StandardTransient`, it stops from complaining on `NCollectionHandle`, but then it starts complaining on: type Graphic3dShaderProgram* {.importcpp: "Graphic3d_ShaderProgram", header: "Graphic3d_ShaderProgram.hxx", bycopy.} = object of StandardTransient Run because obviously `StandardTransient` stops being inheritable. What would be the proper way to mark it as `inheritable`?