mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-11 15:53:46 +00:00
24 lines
587 B
Plaintext
Vendored
24 lines
587 B
Plaintext
Vendored
// "Create extension function 'Any.component2'" "true"
|
|
// WITH_RUNTIME
|
|
class FooIterator<T> {
|
|
operator fun hasNext(): Boolean { return false }
|
|
operator fun next(): Any {
|
|
TODO("not implemented")
|
|
}
|
|
}
|
|
class Foo<T> {
|
|
operator fun iterator(): FooIterator<String> {
|
|
TODO("not implemented")
|
|
}
|
|
}
|
|
operator fun Any.component1(): Int {
|
|
return 0
|
|
}
|
|
fun foo() {
|
|
for ((i: Int, j: Int) in Foo<Int>()) { }
|
|
}
|
|
|
|
private operator fun Any.component2(): Int {
|
|
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
|
|
}
|