constraint generation: checked if denoted type matches inferred type in let binding