a736d62edd
This commits checks iterator/hasNext/next functions whether they are declared as operator or not. Also, it changes logic of hasNext/next error reporting, now we're able to report errors about both these functions.
13 lines
243 B
Kotlin
Vendored
13 lines
243 B
Kotlin
Vendored
// FIR_IDENTICAL
|
|
class Coll {
|
|
operator fun iterator(): It? = null
|
|
}
|
|
|
|
class It {
|
|
operator fun next() = 1
|
|
operator fun hasNext() = false
|
|
}
|
|
|
|
fun test() {
|
|
for (x in <!HAS_NEXT_FUNCTION_NONE_APPLICABLE, NEXT_NONE_APPLICABLE!>Coll()<!>) {}
|
|
} |