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