[FE] Prohibit actual typealias to certain compiler annotations

^KT-58554
This commit is contained in:
Roman Efremov
2023-07-13 11:29:24 +02:00
committed by Space Team
parent f4a648aa3e
commit a79282cec1
21 changed files with 198 additions and 0 deletions
@@ -0,0 +1,28 @@
// FIR_IDENTICAL
// WITH_STDLIB
// MODULE: m1-common
// FILE: common.kt
expect annotation class TypealiasToKotlinPkg
internal expect annotation class TypealiasToInternalPkg
expect annotation class TypealiasToAnnotationPkg
expect annotation class TypealiasToPlatformPkg
expect enum class TypealiasNotToAnnotation
// MODULE: m1-jvm()()(m1-common)
// FILE: jvm.kt
actual typealias TypealiasToKotlinPkg = <!ACTUAL_TYPEALIAS_TO_SPECIAL_ANNOTATION!>kotlin.Deprecated<!>
@Suppress("INVISIBLE_REFERENCE")
internal actual typealias TypealiasToInternalPkg = <!ACTUAL_TYPEALIAS_TO_SPECIAL_ANNOTATION!>kotlin.internal.RequireKotlin<!>
actual typealias TypealiasToAnnotationPkg = <!ACTUAL_TYPEALIAS_TO_SPECIAL_ANNOTATION!>kotlin.annotation.Target<!>
actual typealias TypealiasToPlatformPkg = kotlin.jvm.Synchronized
typealias NonActualTypealias = kotlin.Deprecated
actual typealias TypealiasNotToAnnotation = kotlin.DeprecationLevel