PSI2IR fix suspend conversion tests
- support chained suspend conversion + SAM conversion - support suspend conversion in vararg elements
This commit is contained in:
committed by
teamcityserver
parent
0cc6fbbc6e
commit
d41fc0b599
+10
-3
@@ -1,5 +1,12 @@
|
||||
// !LANGUAGE: +SuspendConversion
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_EXPRESSION
|
||||
// IGNORE_BACKEND: JVM
|
||||
// IGNORE_BACKEND: WASM
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
|
||||
fun interface Runnable {
|
||||
fun run()
|
||||
}
|
||||
|
||||
fun interface SuspendRunnable {
|
||||
suspend fun run()
|
||||
@@ -12,7 +19,7 @@ object Test1 {
|
||||
fun call(r: SuspendRunnable) {}
|
||||
|
||||
fun bar(f: () -> Unit) {
|
||||
<!DEBUG_INFO_CALL("fqName: Test1.call; typeCall: function")!>call(f)<!>
|
||||
call(f)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -24,13 +31,13 @@ object Test2 {
|
||||
fun call(r: SuspendRunnable) {}
|
||||
|
||||
fun bar(f: () -> Unit) {
|
||||
<!DEBUG_INFO_CALL("fqName: Test2.Scope.call; typeCall: function")!>call(f)<!>
|
||||
call(f)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
Test2.Scope.bar { }
|
||||
Test1.Scope.bar { }
|
||||
Test2.Scope.bar { }
|
||||
return "OK"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user