set type correctly for assignment expressions