diff --git a/kotlin-native/backend.native/tests/runtime/basic/cleaner_workers.kt b/kotlin-native/backend.native/tests/runtime/basic/cleaner_workers.kt index a5c4f573df9..3b759c92d24 100644 --- a/kotlin-native/backend.native/tests/runtime/basic/cleaner_workers.kt +++ b/kotlin-native/backend.native/tests/runtime/basic/cleaner_workers.kt @@ -2,7 +2,7 @@ * Copyright 2010-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license * that can be found in the LICENSE file. */ -@file:OptIn(ExperimentalStdlibApi::class, FreezingIsDeprecated::class) +@file:OptIn(ExperimentalStdlibApi::class, FreezingIsDeprecated::class, kotlin.experimental.ExperimentalNativeApi::class) package runtime.basic.cleaner_workers diff --git a/kotlin-native/backend.native/tests/runtime/memory/cycles1.kt b/kotlin-native/backend.native/tests/runtime/memory/cycles1.kt index ae7572e7b0b..9dc33eaee60 100644 --- a/kotlin-native/backend.native/tests/runtime/memory/cycles1.kt +++ b/kotlin-native/backend.native/tests/runtime/memory/cycles1.kt @@ -3,6 +3,8 @@ * that can be found in the LICENSE file. */ +@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class) + package runtime.memory.cycles1 import kotlin.test.* diff --git a/kotlin-native/backend.native/tests/runtime/memory/weak0.kt b/kotlin-native/backend.native/tests/runtime/memory/weak0.kt index b0eac53d4e3..0c8cecfac21 100644 --- a/kotlin-native/backend.native/tests/runtime/memory/weak0.kt +++ b/kotlin-native/backend.native/tests/runtime/memory/weak0.kt @@ -3,6 +3,8 @@ * that can be found in the LICENSE file. */ +@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class) + package runtime.memory.weak0 import kotlin.test.* diff --git a/kotlin-native/backend.native/tests/runtime/memory/weak1.kt b/kotlin-native/backend.native/tests/runtime/memory/weak1.kt index 57dffc65550..754dd2ef368 100644 --- a/kotlin-native/backend.native/tests/runtime/memory/weak1.kt +++ b/kotlin-native/backend.native/tests/runtime/memory/weak1.kt @@ -3,6 +3,8 @@ * that can be found in the LICENSE file. */ +@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class) + package runtime.memory.weak1 import kotlin.test.* diff --git a/kotlin-native/backend.native/tests/runtime/workers/worker10.kt b/kotlin-native/backend.native/tests/runtime/workers/worker10.kt index 5fd7b72ce4e..8124defb8e3 100644 --- a/kotlin-native/backend.native/tests/runtime/workers/worker10.kt +++ b/kotlin-native/backend.native/tests/runtime/workers/worker10.kt @@ -1,4 +1,4 @@ -@file:OptIn(FreezingIsDeprecated::class) +@file:OptIn(FreezingIsDeprecated::class, kotlin.experimental.ExperimentalNativeApi::class) package runtime.workers.worker10 import kotlin.test.* diff --git a/kotlin-native/runtime/src/main/kotlin/kotlin/native/ref/Weak.kt b/kotlin-native/runtime/src/main/kotlin/kotlin/native/ref/Weak.kt index 3192c5022d4..b97e034021e 100644 --- a/kotlin-native/runtime/src/main/kotlin/kotlin/native/ref/Weak.kt +++ b/kotlin-native/runtime/src/main/kotlin/kotlin/native/ref/Weak.kt @@ -5,11 +5,14 @@ package kotlin.native.ref +import kotlin.experimental.ExperimentalNativeApi + /** * Class WeakReference encapsulates weak reference to an object, which could be used to either * retrieve a strong reference to an object, or return null, if object was already destroyed by * the memory manager. */ +@ExperimentalNativeApi public class WeakReference { /** * Creates a weak reference object pointing to an object. Weak reference doesn't prevent