For with Int#downto, Int#upto do not iterate on empty ranges.
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
package foo
|
||||
|
||||
import java.util.ArrayList
|
||||
|
||||
fun box() : Boolean {
|
||||
for (i in 0 upto -1) {
|
||||
return false
|
||||
}
|
||||
for (i in 0 downto 1) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
Reference in New Issue
Block a user