Simplify loop building by encoding open/closed bound information in the
HeaderInfo object, and modifying the operator in the loop condition. The "additional emptiness condition" is no longer necessary with this. The open/closed property was removed from HeaderInfo in an earlier commit, but bringing it back in to simplify the loop building makes more sense. Also expanded tests for evaluation order of range bounds.
This commit is contained in:
committed by
max-kammerer
parent
7680e7fd56
commit
dd65e0876f
@@ -1,6 +1,6 @@
|
||||
fun test(): Int {
|
||||
fun test(a: Int, b: Int): Int {
|
||||
var sum = 0
|
||||
for (i in 1 until 6) {
|
||||
for (i in a until b) {
|
||||
sum = sum * 10 + i
|
||||
}
|
||||
return sum
|
||||
|
||||
Reference in New Issue
Block a user