Generate CHECKCAST Object inside the markers
otherwise, the unboxing interferes with bytecode analysis.
This commit is contained in:
-1
@@ -1,6 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
|
||||
import helpers.*
|
||||
import kotlin.coroutines.*
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
|
||||
import helpers.*
|
||||
import kotlin.coroutines.*
|
||||
|
||||
+1
@@ -1,5 +1,6 @@
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
|
||||
import helpers.*
|
||||
import kotlin.coroutines.*
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
|
||||
import helpers.*
|
||||
import kotlin.coroutines.*
|
||||
|
||||
+1
@@ -1,5 +1,6 @@
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
|
||||
import helpers.*
|
||||
import kotlin.coroutines.*
|
||||
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
// FILE: inline.kt
|
||||
|
||||
inline class IC(val s: String)
|
||||
|
||||
suspend fun o(): IC = IC("O")
|
||||
suspend fun k(): IC = IC("K")
|
||||
|
||||
inline suspend fun inlineMe(): String {
|
||||
return o().s + k().s
|
||||
}
|
||||
|
||||
// FILE: box.kt
|
||||
|
||||
import helpers.*
|
||||
import kotlin.coroutines.*
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
var res = "FAIL"
|
||||
builder {
|
||||
res = inlineMe()
|
||||
}
|
||||
return res
|
||||
}
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
// CHECK_STATE_MACHINE
|
||||
|
||||
// FILE: inline.kt
|
||||
|
||||
import helpers.*
|
||||
|
||||
inline class IC(val s: String)
|
||||
|
||||
suspend fun o(): IC {
|
||||
StateMachineChecker.suspendHere()
|
||||
return IC("O")
|
||||
}
|
||||
|
||||
suspend fun k(): IC {
|
||||
StateMachineChecker.suspendHere()
|
||||
return IC("K")
|
||||
}
|
||||
|
||||
inline suspend fun inlineMe(): String {
|
||||
return o().s + k().s
|
||||
}
|
||||
|
||||
// FILE: box.kt
|
||||
|
||||
import helpers.*
|
||||
import kotlin.coroutines.*
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(CheckStateMachineContinuation)
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
var res = "FAIL"
|
||||
builder {
|
||||
res = inlineMe()
|
||||
}
|
||||
StateMachineChecker.check(2)
|
||||
return res
|
||||
}
|
||||
Reference in New Issue
Block a user