var a = {1: 2, 3: 4} a.iterate(1.5) // expect runtime error: Iterator must be an integer.