KT-2701 Prevent redeclaration in multi-declaration

#KT-2701 Fixed
This commit is contained in:
Natalia.Ukhorskaya
2012-10-24 17:52:44 +04:00
parent 34a9d6a469
commit bf489c9ed8
6 changed files with 37 additions and 7 deletions
@@ -0,0 +1,14 @@
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
}