Implement correct is check for SuspendFunction
Add test for suspend functions with language version 1.2. Minor edit in SuspendFunction docs.
This commit is contained in:
committed by
Ilya Gorbunov
parent
a205019156
commit
fe451dce31
+19
@@ -0,0 +1,19 @@
|
||||
// IGNORE_BACKEND: JS_IR, JS
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
// LANGUAGE_VERSION: 1.2
|
||||
|
||||
import helpers.*
|
||||
import kotlin.coroutines.*
|
||||
|
||||
val lambda1 = { x: Any -> } as (Any) -> Unit
|
||||
val suspendLambda0: suspend () -> Unit = {}
|
||||
|
||||
fun box(): String {
|
||||
assert(lambda1 is SuspendFunction0<*>) { "Failed: lambda1 !is SuspendFunction0<*>" }
|
||||
assert(suspendLambda0 is Function1<*, *>) { "Failed: suspendLambda0 is Function1<*, *>" }
|
||||
assert(suspendLambda0 is SuspendFunction0<*>) { "Failed: suspendLambda0 is SuspendFunction0<*>" }
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user