Files
kotlin-fork/compiler/testData/ir/irText/expressions/forWithImplicitReceivers.fir.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

55 lines
901 B
Kotlin
Vendored

object FiveTimes {
private constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
}
class IntCell {
constructor(value: Int) /* primary */ {
super/*Any*/()
/* <init>() */
}
var value: Int
field = value
get
set
}
interface IReceiver {
operator fun FiveTimes.iterator(): IntCell {
return IntCell(value = 5)
}
operator fun IntCell.hasNext(): Boolean {
return greater(arg0 = <this>.<get-value>(), arg1 = 0)
}
operator fun IntCell.next(): Int {
return { // BLOCK
val tmp_0: Int = <this>.<get-value>()
<this>.<set-value>(<set-?> = tmp_0.dec())
tmp_0
}
}
}
fun IReceiver.test() {
{ // BLOCK
val tmp_1: IntCell = (<this>, FiveTimes).iterator()
while ((<this>, tmp_1).hasNext()) { // BLOCK
val i: Int = (<this>, tmp_1).next()
{ // BLOCK
println(message = i)
}
}
}
}