mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-18 08:31:38 +00:00
Check for COROUTINE_SUSPENDED inside callable reference
#KT-41429 Fixed
This commit is contained in:
@@ -23,4 +23,5 @@ suspend fun test() {
|
||||
|
||||
// -- 1 in 'useICAny(suspendGeneric(ICAny("")))
|
||||
// -- 1 in 'equals-impl' for ICAny
|
||||
// 2 INVOKEVIRTUAL ICAny\.unbox-impl
|
||||
// -- 2 on resume path of suspendICAny
|
||||
// 4 INVOKEVIRTUAL ICAny\.unbox-impl
|
||||
@@ -11,14 +11,14 @@ fun useIC(x: IC1) {}
|
||||
fun useAny(x: Any) {}
|
||||
|
||||
suspend fun test() {
|
||||
useIC(suspendIC())
|
||||
useIC(suspendIC()) // IC1.unbox-impl of resume path
|
||||
useIC(suspendGeneric(IC1(IC0("")))) // IC1.box-impl, IC1.unbox-impl
|
||||
useAny(suspendAny())
|
||||
useAny(suspendIC()) // IC1.box-impl
|
||||
useAny(suspendIC()) // IC1.box-impl, IC1.unbox-impl of resume path
|
||||
}
|
||||
|
||||
// 0 INVOKESTATIC IC0\.box-impl
|
||||
// 3 INVOKESTATIC IC1\.box-impl
|
||||
|
||||
// 1 INVOKEVIRTUAL IC0\.unbox-impl
|
||||
// 2 INVOKEVIRTUAL IC1\.unbox-impl
|
||||
// 4 INVOKEVIRTUAL IC1\.unbox-impl
|
||||
|
||||
@@ -23,4 +23,5 @@ suspend fun test() {
|
||||
|
||||
// -- 1 in 'useICString(suspendGeneric(ICString("")))
|
||||
// -- 1 in 'equals-impl' for ICString
|
||||
// 2 INVOKEVIRTUAL ICString\.unbox-impl
|
||||
// -- 2 in resume path of suspendICString
|
||||
// 4 INVOKEVIRTUAL ICString\.unbox-impl
|
||||
@@ -7,5 +7,5 @@ inline class OurAny(val a: Any)
|
||||
|
||||
suspend fun returnsUnboxed(): OurAny = OurAny("OK")
|
||||
|
||||
// 1 INVOKESTATIC kotlin/Result.box-impl
|
||||
// 0 INVOKESTATIC kotlin/Result.box-impl
|
||||
// 0 INVOKESTATIC OurAny.box-impl
|
||||
Reference in New Issue
Block a user