D-Programming-Language/dmd — pull request #2538 by lionello (2013-09-08 09:13:40+00:00)
Title: foreach range uses same logic as ?: for type deduction

This pull request partly addresses the issue raised by bug 1878. When both types in the range expression are the same, that type will be used for the iteration variable. This is similar to the way ?: deduces types.

Both ?: and range expression should use VRP logic, eventually.