From f8a1395a030fb7cedd193fc2c4ca69df028e305f Mon Sep 17 00:00:00 2001 From: Pavel Kirpichenkov Date: Mon, 14 Feb 2022 10:38:04 +0300 Subject: [PATCH] [MPP] allow function and property targets for @UnsafeNumber annotation KT-51224 KT-51215 --- .../src/main/kotlin/kotlinx/cinterop/Annotations.kt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/kotlin-native/Interop/Runtime/src/main/kotlin/kotlinx/cinterop/Annotations.kt b/kotlin-native/Interop/Runtime/src/main/kotlin/kotlinx/cinterop/Annotations.kt index b6f2749672d..c78bfab754a 100644 --- a/kotlin-native/Interop/Runtime/src/main/kotlin/kotlinx/cinterop/Annotations.kt +++ b/kotlin-native/Interop/Runtime/src/main/kotlin/kotlinx/cinterop/Annotations.kt @@ -6,13 +6,14 @@ package kotlinx.cinterop /** - * Marker for typealias that will represent numbers of different bit width on at least two platforms. + * Marker for typealias that will represent numbers of different bit width on at least two platforms, + * or function/property that have such numbers in their signature. * - * @param actualPlatformTypes: Contains the underlying platform types represented as `{konanTarget}: {type fqn}` + * @param actualPlatformTypes: Contains platform types represented as `{konanTarget}: {type fqn}` * e.g. ["linux_x64: kotlin.Int", "linux_arm64: kotlin.Long"] */ @Suppress("unused") // Is emitted by the Commonizer -@Target(AnnotationTarget.TYPEALIAS) +@Target(AnnotationTarget.TYPEALIAS, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY) @Retention(AnnotationRetention.BINARY) @RequiresOptIn(level = RequiresOptIn.Level.WARNING) annotation class UnsafeNumber(val actualPlatformTypes: Array) \ No newline at end of file