Basic class members generation.
Split testData into 'classes' and 'expressions'.
This commit is contained in:
committed by
Dmitry Petrov
parent
703d3405ed
commit
0b647ac358
@@ -0,0 +1,15 @@
|
||||
object FiveTimes
|
||||
|
||||
class IntCell(var value: Int)
|
||||
|
||||
interface IReceiver {
|
||||
operator fun FiveTimes.iterator() = IntCell(5)
|
||||
operator fun IntCell.hasNext() = value > 0
|
||||
operator fun IntCell.next() = value--
|
||||
}
|
||||
|
||||
fun IReceiver.test() {
|
||||
for (i in FiveTimes) {
|
||||
println(i)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user