Question: How do I use object inheritance inside a module?

I am trying to make a library, and therfore package that contains a bunch of objects that inherit from each other.

I understand how to create objects that inherit from one another and my code here works fine:

module ParentObject()
   option object;
end module;

module ChildObject()
   option object(ParentObject);
end module;

However when I put it all in a package with code below:

module Package()
   option package;
   export ParentObject, ChildObject;
   
   module ParentObject()
      option object;
   end module;

   module ChildObject()
      option object(ParentObject);
   end module;

end module;

I get the error "Error, argument of option object(ParentObject) refer to another object in module Package:-ChildObject".

Any sugguestions?

Please Wait...