[K/N] Transform FunctionReference without bound values to ConstantValue
This commit is contained in:
@@ -8,8 +8,9 @@ import kotlin.native.concurrent.*
|
||||
import kotlin.native.internal.*
|
||||
|
||||
fun mainLegacyMM() {
|
||||
val wrong = "wrong"
|
||||
assertFailsWith<InvalidMutabilityException> {
|
||||
setUnhandledExceptionHook { _ -> println("wrong") }
|
||||
setUnhandledExceptionHook { _ -> println(wrong) }
|
||||
}
|
||||
|
||||
val x = 42
|
||||
|
||||
@@ -49,14 +49,16 @@ fun withLock(op: () -> Unit) {
|
||||
}
|
||||
} else {
|
||||
assertFailsWith<IllegalStateException> {
|
||||
val message = "shall not happen"
|
||||
worker.executeAfter {
|
||||
println("shall not happen")
|
||||
println(message)
|
||||
}
|
||||
}
|
||||
}
|
||||
assertFailsWith<IllegalArgumentException> {
|
||||
val message = "shall not happen"
|
||||
worker.executeAfter(-1, {
|
||||
println("shall not happen")
|
||||
println(message)
|
||||
}.freeze())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user