FirForLoopChecker: report also OPERATOR_MODIFIER if appropriate + minor

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.
This commit is contained in:
Mikhail Glukhikh
2021-04-16 15:24:16 +03:00
parent 2e14b65644
commit a736d62edd
16 changed files with 222 additions and 52 deletions
@@ -4,6 +4,6 @@ class X
operator fun <T> X.iterator(): Iterable<T> = TODO()
fun test() {
for (i in <!HAS_NEXT_MISSING!>X()<!>) {
for (i in <!HAS_NEXT_MISSING, NEXT_MISSING!>X()<!>) {
}
}