Use of $cast to copy values

In reply to bachan21:

Can you share more test bench code on how these objects are declared and used? are they both pointing to the same object?

$cast syntax is as follows
$cast(destination,source)

It is both a type check and also an handle assignment from the source to the destination but not the other way.