[FIR] Provide suppression from primary value parameter to property

`@Suppress` annotation has `VALUE_PARAMETER` target, so when a property
  in the primary constructor is annotated with `@Suppress` it sticks
  to the parameter. But the suppression should work for all diagnostics
  reported on the parameter **and** the property

^KT-66258 Fixed
This commit is contained in:
Dmitriy Novozhilov
2024-03-04 14:57:56 +02:00
committed by Space Team
parent 5e742884de
commit a08df1821f
3 changed files with 23 additions and 20 deletions
@@ -1,18 +0,0 @@
// DIAGNOSTICS: -ERROR_SUPPRESSION
// WITH_STDLIB
// ISSUE: KT-66258
@RequiresOptIn
annotation class Ann
class A(
<!OPT_IN_MARKER_ON_WRONG_TARGET!>@get:Ann<!>
@Suppress("OPT_IN_MARKER_ON_WRONG_TARGET")
val s: String
)
class B {
@get:Ann
@Suppress("OPT_IN_MARKER_ON_WRONG_TARGET")
val s: String = ""
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// DIAGNOSTICS: -ERROR_SUPPRESSION
// WITH_STDLIB
// ISSUE: KT-66258