Files
kotlin-fork/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/RedeclarationInForLoop.kt
T

15 lines
248 B
Kotlin
Vendored

class A {
operator fun component1() = 1
operator fun component2() = 1
}
class C {
operator fun iterator(): Iterator<A> = null!!
}
fun test() {
for ((<!REDECLARATION!>x<!>, <!NAME_SHADOWING, REDECLARATION!>x<!>) in C()) {
}
}