You may also compare your code with this example of OOP inheritance:

[https://forum.nim-lang.org/t/4226](https://forum.nim-lang.org/t/4226)

The corrected code of lscrd should compile and work.

I think your own code on the top is a bit "strange and dangerous" as you 
manually initialize member fields of your base class in you child classes. I 
think it is more clean to have an init proc for base class, so you call this 
first, then initialize the new fields of your child class. Note that your base 
class may be even located in another module and base class implementation may 
change without notice in general case.

Reply via email to