mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-12 00:21:32 +00:00
18 lines
407 B
Kotlin
Vendored
18 lines
407 B
Kotlin
Vendored
// "Create member function 'FooIterator.next'" "true"
|
|
class FooIterator<T> {
|
|
operator fun hasNext(): Boolean { return false }
|
|
}
|
|
class Foo<T> {
|
|
operator fun iterator(): FooIterator<String> {
|
|
TODO("not implemented")
|
|
}
|
|
}
|
|
operator fun Any.component1(): Int {
|
|
return 0
|
|
}
|
|
operator fun Any.component2(): Int {
|
|
return 0
|
|
}
|
|
fun foo() {
|
|
for ((i: Int, j: Int) in Foo<caret><Int>()) { }
|
|
} |