Check that qualified const expressions are recognized properly in 'for'

This commit is contained in:
Dmitry Petrov
2017-12-12 16:26:14 +03:00
parent bf97b332cf
commit 9fa9a8748b
2 changed files with 21 additions and 0 deletions
@@ -0,0 +1,15 @@
object Host {
const val M = 1
const val N = 4
}
fun test(): Int {
var s = 0
for (i in Host.M .. Host.N) {
s += i
}
return s
}
// 0 IF_ICMPEQ
// 1 IF_ICMPGT