In reply to jimmyhuang0904:
Oh. I think I have found my mistake… I was returning the parent_class object the whole time…
Here is the fuller picture of what I had before… I wrote too fast of a pseudocode :
// RETURNS PARENT_CLASS, NOT VOID
function parent_class create_child();
...
if ( !$cast(child, create_component(get_type_name(), $sformatf("m_child_class%0d",children.size() ) ) )
`uvm_fatal("ID","Failed because you didn't register this class with the factory")
...
endfunction : create_child
But how would I return the class of get_type_name()?
My function can only return a handle of parent_class, but in this case, I want it to return my extended_class (svt_manager instead of base_manager)?