Files
kotlin-fork/compiler/testData/ir/irText/expressions/for.kt.txt
T
2024-02-16 10:19:38 +00:00

46 lines
987 B
Kotlin
Vendored

fun testDestructuring(pp: List<Pair<Int, String>>) {
{ // BLOCK
val tmp_0: Iterator<Pair<Int, String>> = pp.iterator()
while (tmp_0.hasNext()) { // BLOCK
val tmp_1: Pair<Int, String> = tmp_0.next()
val i: Int = tmp_1.component1()
val s: String = tmp_1.component2()
{ // BLOCK
println(message = i)
println(message = s)
}
}
}
}
fun testEmpty(ss: List<String>) {
{ // BLOCK
val tmp_2: Iterator<String> = ss.iterator()
while (tmp_2.hasNext()) { // BLOCK
val s: String = tmp_2.next()
}
}
}
fun testIterable(ss: List<String>) {
{ // BLOCK
val tmp_3: Iterator<String> = ss.iterator()
while (tmp_3.hasNext()) { // BLOCK
val s: String = tmp_3.next()
{ // BLOCK
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()
}
}
}