adapt `cast_or_unify` ref name
retain current return type constraints