Allow calling some pieces of the experimental coroutine API
- Calling suspend functions is allowed - Presence of suspend function type still makes declaration unusable unless it belongs to a value parameter as a top-level type containing less then three parameters Still, warning should be emitted because they will become unsupported in 1.4 #KT-25683 In Progress
This commit is contained in:
+4
-4
@@ -24,14 +24,14 @@ fun builder(c: <!UNSUPPORTED!>suspend<!> () -> Unit) {}
|
||||
}
|
||||
|
||||
fun test2() {
|
||||
kotlin.coroutines.experimental.<!DEPRECATION_ERROR, UNSUPPORTED!>buildSequence<!><Int> {
|
||||
<!DEPRECATION_ERROR!>yield<!>(1)
|
||||
kotlin.coroutines.experimental.<!DEPRECATION, UNSUPPORTED!>buildSequence<!><Int> {
|
||||
<!DEPRECATION!>yield<!>(1)
|
||||
}
|
||||
kotlin.sequences.<!UNRESOLVED_REFERENCE!>buildSequence<!><Int> {
|
||||
<!UNRESOLVED_REFERENCE!>yield<!>(1)
|
||||
}
|
||||
}
|
||||
|
||||
<!UNSUPPORTED!>suspend<!> fun test3(): Unit = kotlin.coroutines.experimental.<!DEPRECATION_ERROR!>suspendCoroutine<!> { _ -> Unit }
|
||||
<!UNSUPPORTED!>suspend<!> fun test3(): Unit = kotlin.coroutines.experimental.<!DEPRECATION!>suspendCoroutine<!> { _ -> Unit }
|
||||
|
||||
<!UNSUPPORTED!>suspend<!> fun test4(): Unit = kotlin.coroutines.<!UNRESOLVED_REFERENCE!>suspendCoroutine<!> { <!CANNOT_INFER_PARAMETER_TYPE!>_<!> -> Unit }
|
||||
<!UNSUPPORTED!>suspend<!> fun test4(): Unit = kotlin.coroutines.<!UNRESOLVED_REFERENCE!>suspendCoroutine<!> { <!CANNOT_INFER_PARAMETER_TYPE!>_<!> -> Unit }
|
||||
|
||||
Reference in New Issue
Block a user