Use 'run' function instead of 'synchronized' in KT-51036 test
It should be enough to reproduce the issue and makes the test runnable on all backends
This commit is contained in:
committed by
Space Team
parent
92a7a74382
commit
568d4b11af
+1
-6
@@ -1,8 +1,4 @@
|
||||
// WITH_STDLIB
|
||||
// IGNORE_BACKEND: WASM
|
||||
// ^ Unresolved reference: synchronized
|
||||
// IGNORE_BACKEND: NATIVE
|
||||
// ^ Unresolved reference: synchronized
|
||||
|
||||
fun box(): String {
|
||||
A().close()
|
||||
@@ -12,6 +8,5 @@ fun box(): String {
|
||||
class A {
|
||||
companion object;
|
||||
operator fun String.invoke() = Unit
|
||||
@Suppress("DEPRECATION_ERROR")
|
||||
fun close() = synchronized(this) { "abc" }()
|
||||
fun close() = kotlin.run { "abc" }()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user