Type inference of local variables