KTIJ-26959 [AA] Do not ignore underscore named properties in KtFirImportOptimizer

After the fix for the KT-60904 issue (c963eadb),
there are unnamed declarations created even for
the unused variables in destructuring declarations

Because of this, we can actually align testData
for K1 and K2. It seems like KT-59504 is no
longer relevant and can be marked as obsolete
because of the KT-60904 fix

^KTIJ-26959 Fixed
This commit is contained in:
Roman Golyshev
2023-09-07 17:43:15 +02:00
committed by teamcity
parent 9a2307ad44
commit f5307173b5
10 changed files with 68 additions and 8 deletions
@@ -1,2 +1 @@
dependency.component2
dependency.component3
dependency.component3
@@ -0,0 +1,13 @@
// FILE: main.kt
package test
import dependency.MyException
fun usage() {
try {} catch (_: MyException) {}
}
// FILE: dependency.kt
package dependency
class MyException : RuntimeException()
@@ -0,0 +1,16 @@
// FILE: main.kt
package test
import dependency.MyClass
import dependency.Holder
fun usage(holder: Holder) {
val (one, _: MyClass) = holder
}
// FILE: dependency.kt
package dependency
class MyClass
data class Holder(val one: MyClass, val two: MyClass)