From a27c1e10b594c26ded33f4cceccfea47d5628954 Mon Sep 17 00:00:00 2001 From: Ilya Gorbunov Date: Fri, 19 Jun 2020 00:18:27 +0300 Subject: [PATCH] Drop deprecated Synchronized, Volatile annotations and synchronized fun (cherry picked from commit b138579e34de62e63ad9e3f2a6bf8eed22f5f9bd) --- .../kotlin/kotlin/native/Compatibility.kt | 29 ------------------- 1 file changed, 29 deletions(-) delete mode 100644 runtime/src/main/kotlin/kotlin/native/Compatibility.kt diff --git a/runtime/src/main/kotlin/kotlin/native/Compatibility.kt b/runtime/src/main/kotlin/kotlin/native/Compatibility.kt deleted file mode 100644 index c558d5223e6..00000000000 --- a/runtime/src/main/kotlin/kotlin/native/Compatibility.kt +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2010-2018 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. - */ - -package kotlin - -// Note: -// Right now we don't want to have neither 'volatile' nor 'synchronized' at runtime, as it has different -// concurrency approach. - -@Target(AnnotationTarget.PROPERTY, AnnotationTarget.FIELD) -@Retention(AnnotationRetention.SOURCE) -@Deprecated("Do not use Volatile annotation in pure Kotlin/Native code", level = DeprecationLevel.ERROR) -public annotation class Volatile - -@Target(AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER) -@Retention(AnnotationRetention.SOURCE) -@Deprecated("Do not use Synchronized annotation in pure Kotlin/Native code", level = DeprecationLevel.ERROR) -public annotation class Synchronized - -/** - * An actual implementation of `synchronized` method. This method is not supported in Kotlin/Native - * @throws UnsupportedOperationException always - */ -@kotlin.internal.InlineOnly -@Deprecated("Do not use 'synchronized' function in Kotlin/Native code", level = DeprecationLevel.ERROR) -public actual inline fun synchronized(@Suppress("UNUSED_PARAMETER") lock: Any, block: () -> R): R = - throw UnsupportedOperationException("synchronized() is unsupported") \ No newline at end of file