Files
kotlin-fork/compiler/testData/diagnostics/tests/shadowing/ShadowMultiDeclarationWithFunParameter.kt
T
Natalia.Ukhorskaya bf489c9ed8 KT-2701 Prevent redeclaration in multi-declaration
#KT-2701 Fixed
2012-10-25 19:03:36 +04:00

14 lines
280 B
Kotlin

class A {
fun component1() = 42
fun component2() = 42
}
fun foo(a: A, c: Int) {
val (<!NAME_SHADOWING!>a<!>, b) = a
val arr = Array(2) { A() }
for ((<!NAME_SHADOWING!>c<!>, d) in arr) {
}
val <!UNUSED_VARIABLE!>e<!> = a.toString() + b + c
}