Simple type inference on variable assignment.