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