mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-11 15:53:46 +00:00
19 lines
441 B
Kotlin
Vendored
19 lines
441 B
Kotlin
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<caret><Int>()) { }
|
|
} |