[FE] Skip more special annotations in KMP annotation matching

Many errors are reported in stdlib with these annotations
(SinceKotlin, Deprecated, so on).
But having them only on expect is a valid case. E.g. SinceKotlin added
if some old platform-specific API becomes commonized.

^KT-58551
This commit is contained in:
Roman Efremov
2023-06-27 12:39:44 +02:00
committed by Space Team
parent 1dcdcee452
commit ad84c83ee9
11 changed files with 69 additions and 26 deletions
@@ -1,12 +0,0 @@
// FIR_IDENTICAL
// WITH_STDLIB
// MODULE: m1-common
// FILE: common.kt
@OptIn(ExperimentalMultiplatform::class)
@OptionalExpectation
expect annotation class MyAnnotation
// MODULE: m1-jvm()()(m1-common)
// FILE: jvm.kt
@OptIn(ExperimentalMultiplatform::class)
actual annotation class MyAnnotation
@@ -0,0 +1,30 @@
// FIR_IDENTICAL
// WITH_STDLIB
// MODULE: m1-common
// FILE: common.kt
package kotlin
@OptIn(ExperimentalMultiplatform::class)
@OptionalExpectation
expect annotation class OptionalExpectationOnExpectOnly
@RequiresOptIn
annotation class MyOptIn
@SinceKotlin("1.8")
@Deprecated(message = "Some text")
@DeprecatedSinceKotlin("1.8")
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
@MyOptIn
@WasExperimental(MyOptIn::class)
@kotlin.internal.RequireKotlin(version = "1.8")
expect fun skippedAnnotationsOnExpectOnly()
// MODULE: m1-jvm()()(m1-common)
// FILE: jvm.kt
package kotlin
@OptIn(ExperimentalMultiplatform::class)
actual annotation class OptionalExpectationOnExpectOnly
actual fun skippedAnnotationsOnExpectOnly() {}