[scala] fix bug on assignment valuation function