I am having a hard time understanding how to get the following code structure to work.
In Scala I have a class MyClass which inherits from SomeClass<
MyClass
SomeClass<
Probably you are hitting the infamous "one question FAQ" about initialization order.
If the method is invoked by the superclass constructor, then your initialization happens after that, resetting the data to zero.