$cast() vs. UVM type override

In reply to dave_59:

Yep, you are right. So, in my example, with the type override applied, cast1 = $cast(agent_a_h_2, agent_a_h); works also because, the class type of agent_a_h is actually agent_b which in turn is subclass of agent_a, right? It is always legal to assign a subclass object handle to a variable of the superclass which results in a successful cast in that case?

-ilia