Type.getRealCast should use toCast