[K2] Disappeared OPT_IN_USAGE_ERROR for a data class property during the destructuring declaration

^KT-62450
This commit is contained in:
Anastasia.Nekrasova
2023-10-12 14:57:35 +03:00
committed by Space Team
parent dfdd86da1f
commit 9ad4cf4c55
10 changed files with 85 additions and 2 deletions
@@ -0,0 +1,19 @@
// !OPT_IN: kotlin.RequiresOptIn
// FILE: api.kt
// MODULE: A
package main
@kotlin.RequiresOptIn
annotation class Marker
data class DataClass(@property:Marker val x: Int)
// MODULE: B(A)
package main
fun test(d: DataClass) {
val (<!OPT_IN_USAGE_ERROR!>x<!>) = d
val c = d.<!OPT_IN_USAGE_ERROR!>component1<!>()
}