Basic inference of expression types