Files
kotlin-fork/compiler/testData/ir/irText/expressions/for.kt.txt
T
Vladimir Sukharev bae8b283c7 [IR] Normalize temp var names in Kotlin-like dump
^KT-61983 Fixed
2023-10-11 07:49:35 +00:00

45 lines
986 B
Kotlin
Vendored

fun testEmpty(ss: List<String>) {
{ // BLOCK
val tmp_0: Iterator<String> = ss.iterator()
while (tmp_0.hasNext()) { // BLOCK
val s: String = tmp_0.next()
}
}
}
fun testIterable(ss: List<String>) {
{ // BLOCK
val tmp_1: Iterator<String> = ss.iterator()
while (tmp_1.hasNext()) { // BLOCK
val s: String = tmp_1.next()
{ // BLOCK
println(message = s)
}
}
}
}
fun testDestructuring(pp: List<Pair<Int, String>>) {
{ // BLOCK
val tmp_2: Iterator<Pair<Int, String>> = pp.iterator()
while (tmp_2.hasNext()) { // BLOCK
val tmp_3: Pair<Int, String> = tmp_2.next()
val i: Int = tmp_3.component1()
val s: String = tmp_3.component2()
{ // BLOCK
println(message = i)
println(message = s)
}
}
}
}
fun testRange() {
{ // BLOCK
val tmp_4: IntIterator = 1.rangeTo(other = 10).iterator()
while (tmp_4.hasNext()) { // BLOCK
val i: Int = tmp_4.next()
}
}
}