blob: 01cb4caee4fd3bf9b6c474f6bacf9c6faf4ccebe [file]
// LANGUAGE: +NameBasedDestructuring +DeprecateNameMismatchInShortDestructuringWithParentheses +EnableNameBasedDestructuringShortForm
// RUN_PIPELINE_TILL: FRONTEND
class Pair {
operator fun component1(): Int = null!!
operator fun component2(): Int = null!!
}
class Coll {
operator fun iterator(): It = It()
}
class It {
operator fun next() = Pair()
operator fun hasNext() = false
}
fun f() {
for (<!VAL_OR_VAR_ON_LOOP_PARAMETER!>val<!> i in 1..4) {
}
for (<!VAL_OR_VAR_ON_LOOP_PARAMETER!>var<!> i in 1..4) {
}
for (<!VAL_OR_VAR_ON_LOOP_PARAMETER!>val<!> [i,j] in Coll()) {
}
for (<!VAL_OR_VAR_ON_LOOP_PARAMETER!>var<!> [i,j] in Coll()) {
}
}
/* GENERATED_FIR_TAGS: checkNotNullCall, classDeclaration, forLoop, functionDeclaration, integerLiteral, localProperty,
operator, propertyDeclaration, rangeExpression */