15 lines
308 B
Kotlin
15 lines
308 B
Kotlin
package test1
|
|
|
|
public class MyClass {
|
|
}
|
|
|
|
public fun MyClass.iterator(): Iterator<MyClass> {
|
|
return object: Iterator<MyClass> {
|
|
override fun next(): MyClass {
|
|
throw Exception()
|
|
}
|
|
override fun hasNext(): Boolean {
|
|
throw Exception()
|
|
}
|
|
}
|
|
} |