diff --git a/kotlin-native/backend.native/build.gradle b/kotlin-native/backend.native/build.gradle index 6eab077c6e5..fd7954614b9 100644 --- a/kotlin-native/backend.native/build.gradle +++ b/kotlin-native/backend.native/build.gradle @@ -195,6 +195,7 @@ targetList.each { target -> '-Xopt-in=kotlin.contracts.ExperimentalContracts', '-Xopt-in=kotlin.ExperimentalMultiplatform', '-Xopt-in=kotlin.native.internal.InternalForKotlinNative', + '-Xopt-in=kotlin.native.SymbolNameIsDeprecated', '-Xallow-result-return-type', *commonSrc.toList(), *testAnnotationCommon.toList(), diff --git a/kotlin-native/runtime/src/main/kotlin/kotlin/native/Annotations.kt b/kotlin-native/runtime/src/main/kotlin/kotlin/native/Annotations.kt index d2480f99d6d..f3d5e6f6ab8 100644 --- a/kotlin-native/runtime/src/main/kotlin/kotlin/native/Annotations.kt +++ b/kotlin-native/runtime/src/main/kotlin/kotlin/native/Annotations.kt @@ -8,6 +8,21 @@ package kotlin.native import kotlin.reflect.KClass /** + * [SymbolName] annotation is deprecated. + * See [KT-46649](https://youtrack.jetbrains.com/issue/KT-46649). + */ +@RequiresOptIn( + message = "@SymbolName annotation is deprecated. See https://youtrack.jetbrains.com/issue/KT-46649", + level = RequiresOptIn.Level.WARNING +) +@Target(AnnotationTarget.ANNOTATION_CLASS) +@Retention(value = AnnotationRetention.BINARY) +internal annotation class SymbolNameIsDeprecated + +/** + * This annotation is deprecated. + * See [KT-46649](https://youtrack.jetbrains.com/issue/KT-46649). + * * Forces the compiler to use specified symbol name for the target `external` function. * * TODO: changing symbol name breaks the binary compatibility, @@ -15,6 +30,7 @@ import kotlin.reflect.KClass */ @Target(AnnotationTarget.FUNCTION) @Retention(AnnotationRetention.BINARY) +@SymbolNameIsDeprecated public annotation class SymbolName(val name: String) /**