Add test for `needless_range_loop` issue Closes #2277 This was fixed when we fixed #2542. changelog: none
type_repetition_in_bounds