Assignmment based type inference