Confused between $cast and factory override

In reply to UVM_LOVE:

I did see below results from eda playground:
with type override: agent_a::type_id::set_type_override(agent_b::get_type()); //enabling

casts = 1 1 1

without type override: // agent_a::type_id::set_type_override(agent_b::get_type()); //commented it out

casts = 1 0 0

i did see expected results here…