Changed the typechecker to correctly typecheck the declared variable type in a for or for-each loop against the vector element type (for a for loop) or the iterator type (for a for-each loop). Added a test case.