Files
kotlin-fork/compiler/testData/diagnostics/tests/shadowing/ShadowMultiDeclarationWithFunParameter.kt
T
Denis Zharkov 4c69416f2b Report warning on unused entities that can be renamed to _
Currently it's all about lambda parameters/destructuring entries

 #KT-14347 In Progress
2016-10-24 10:19:25 +03:00

15 lines
330 B
Kotlin
Vendored

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