// !DIAGNOSTICS: -UNUSED_VALUE fun foo(k: Int): Int { val i: Int for (j in 1..k) { i = j } return i }