Fix tests: "infix modifier required" and "operator modifier required" errors
This commit is contained in:
+3
-3
@@ -1,10 +1,10 @@
|
||||
|
||||
interface MyIterator<T> {
|
||||
fun hasNext() : Boolean
|
||||
fun next() : T
|
||||
operator fun hasNext() : Boolean
|
||||
operator fun next() : T
|
||||
}
|
||||
|
||||
fun <T : Any> T?.iterator() = object : MyIterator<T> {
|
||||
operator fun <T : Any> T?.iterator() = object : MyIterator<T> {
|
||||
var hasNext = this@iterator != null
|
||||
private set
|
||||
override fun hasNext() = hasNext
|
||||
|
||||
Reference in New Issue
Block a user