Files
kotlin-fork/compiler/testData/codegen/box/unit/kt51036.kt
T
2023-04-26 10:44:52 +00:00

18 lines
361 B
Kotlin
Vendored

// WITH_STDLIB
// IGNORE_BACKEND: WASM
// ^ Unresolved reference: synchronized
// IGNORE_BACKEND: NATIVE
// ^ Unresolved reference: synchronized
fun box(): String {
A().close()
return "OK"
}
class A {
companion object;
operator fun String.invoke() = Unit
@Suppress("DEPRECATION_ERROR")
fun close() = synchronized(this) { "abc" }()
}