SystemVerilog OOP Mastery · All levels
Class Inheritance with `extends`: Pitfalls
Pitfalls for Class Inheritance with `extends`.
Pitfalls and red flags
Using inheritance for has-a relationships and creating brittle deep hierarchies.
Forgetting super.new in a derived constructor and leaving inherited fields uninitialized.
Putting protocol-specific behavior in a generic base class, which breaks reuse.
Expecting multiple inheritance and trying to emulate it with copy-paste base code.