Raise deprecation of js synchronized {} to error
This commit is contained in:
committed by
Space Team
parent
2248f4ea33
commit
f260b55810
@@ -12,5 +12,6 @@ fun box(): String {
|
||||
class A {
|
||||
companion object;
|
||||
operator fun String.invoke() = Unit
|
||||
@Suppress("DEPRECATION_ERROR")
|
||||
fun close() = synchronized(this) { "abc" }()
|
||||
}
|
||||
|
||||
@@ -31,6 +31,8 @@ FILE fqName:<root> fileName:/kt51036.kt
|
||||
RETURN type=kotlin.Nothing from='public final fun invoke (): kotlin.Unit [operator] declared in <root>.A'
|
||||
GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit
|
||||
FUN name:close visibility:public modality:FINAL <> ($this:<root>.A) returnType:kotlin.Unit
|
||||
annotations:
|
||||
Suppress(names = ['DEPRECATION_ERROR'])
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.A
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun close (): kotlin.Unit declared in <root>.A'
|
||||
|
||||
@@ -31,6 +31,8 @@ FILE fqName:<root> fileName:/kt51036.kt
|
||||
RETURN type=kotlin.Nothing from='public final fun invoke (): kotlin.Unit [operator] declared in <root>.A'
|
||||
GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit
|
||||
FUN name:close visibility:public modality:FINAL <> ($this:<root>.A) returnType:kotlin.Unit
|
||||
annotations:
|
||||
Suppress(names = ['DEPRECATION_ERROR'])
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.A
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun close (): kotlin.Unit declared in <root>.A'
|
||||
|
||||
@@ -6,5 +6,6 @@
|
||||
class A {
|
||||
companion object;
|
||||
operator fun String.invoke() = Unit
|
||||
@Suppress("DEPRECATION_ERROR")
|
||||
fun close() = synchronized(this) { "Abc" }()
|
||||
}
|
||||
|
||||
@@ -156,7 +156,7 @@ public inline fun <R> runCatching(block: () -> R): kotlin.Result<R>
|
||||
@kotlin.SinceKotlin(version = "1.2")
|
||||
public inline fun <R> suspend(noinline block: suspend () -> R): suspend () -> R
|
||||
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.6")
|
||||
@kotlin.DeprecatedSinceKotlin(errorSince = "1.9", warningSince = "1.6")
|
||||
@kotlin.Deprecated(message = "Synchronization on any object is not supported in Kotlin/JS", replaceWith = kotlin.ReplaceWith(expression = "run(block)", imports = {}))
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun <R> synchronized(lock: kotlin.Any, block: () -> R): R
|
||||
|
||||
@@ -120,7 +120,7 @@ public inline fun <R> runCatching(block: () -> R): kotlin.Result<R>
|
||||
@kotlin.SinceKotlin(version = "1.2")
|
||||
public inline fun <R> suspend(noinline block: suspend () -> R): suspend () -> R
|
||||
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.6")
|
||||
@kotlin.DeprecatedSinceKotlin(errorSince = "1.9", warningSince = "1.6")
|
||||
@kotlin.Deprecated(message = "Synchronization on any object is not supported in Kotlin/JS", replaceWith = kotlin.ReplaceWith(expression = "run(block)", imports = {}))
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun <R> synchronized(lock: kotlin.Any, block: () -> R): R
|
||||
|
||||
@@ -8,7 +8,7 @@ package kotlin
|
||||
import kotlin.contracts.*
|
||||
|
||||
|
||||
@DeprecatedSinceKotlin(warningSince = "1.6")
|
||||
@DeprecatedSinceKotlin(warningSince = "1.6", errorSince = "1.9")
|
||||
@Deprecated("Synchronization on any object is not supported in Kotlin/JS", ReplaceWith("run(block)"))
|
||||
@kotlin.internal.InlineOnly
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
|
||||
Reference in New Issue
Block a user