Remove some remaining tests on old coroutines
This commit is contained in:
-18
@@ -1,18 +0,0 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// !LANGUAGE: -Coroutines -ReleaseCoroutines
|
||||
|
||||
suspend fun suspendHere(): String = "OK"
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
var result = ""
|
||||
|
||||
builder {
|
||||
suspendHere()
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
-18
@@ -1,18 +0,0 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// !LANGUAGE: -Coroutines -ReleaseCoroutines
|
||||
|
||||
<!UNSUPPORTED_FEATURE!>suspend<!> fun suspendHere(): String = "OK"
|
||||
|
||||
fun builder(c: <!UNSUPPORTED_FEATURE!>suspend<!> () -> Unit) {
|
||||
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
var result = ""
|
||||
|
||||
<!UNSUPPORTED_FEATURE!>builder<!> {
|
||||
suspendHere()
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
-5
@@ -1,5 +0,0 @@
|
||||
package
|
||||
|
||||
public fun box(): kotlin.String
|
||||
public fun builder(/*0*/ c: suspend () -> kotlin.Unit): kotlin.Unit
|
||||
public suspend fun suspendHere(): kotlin.String
|
||||
Vendored
-18
@@ -1,18 +0,0 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// !LANGUAGE: warn:Coroutines -ReleaseCoroutines
|
||||
|
||||
suspend fun suspendHere(): String = "OK"
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
var result = ""
|
||||
|
||||
builder {
|
||||
suspendHere()
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
-18
@@ -1,18 +0,0 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// !LANGUAGE: warn:Coroutines -ReleaseCoroutines
|
||||
|
||||
<!EXPERIMENTAL_FEATURE_WARNING!>suspend<!> fun suspendHere(): String = "OK"
|
||||
|
||||
fun builder(c: <!EXPERIMENTAL_FEATURE_WARNING!>suspend<!> () -> Unit) {
|
||||
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
var result = ""
|
||||
|
||||
<!EXPERIMENTAL_FEATURE_WARNING!>builder<!> {
|
||||
suspendHere()
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
-5
@@ -1,5 +0,0 @@
|
||||
package
|
||||
|
||||
public fun box(): kotlin.String
|
||||
public fun builder(/*0*/ c: suspend () -> kotlin.Unit): kotlin.Unit
|
||||
public suspend fun suspendHere(): kotlin.String
|
||||
Vendored
-38
@@ -1,38 +0,0 @@
|
||||
// !LANGUAGE: -ReleaseCoroutines
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER -EXPERIMENTAL_FEATURE_WARNING
|
||||
// !CHECK_TYPE
|
||||
// !WITH_NEW_INFERENCE
|
||||
// SKIP_TXT
|
||||
|
||||
import kotlin.coroutines.*
|
||||
import kotlin.coroutines.intrinsics.*
|
||||
|
||||
class Controller {
|
||||
suspend fun noParams(): Unit = suspendCoroutineUninterceptedOrReturn {
|
||||
if (hashCode() % 2 == 0) {
|
||||
it.resume(Unit)
|
||||
COROUTINE_SUSPENDED
|
||||
}
|
||||
else {
|
||||
Unit
|
||||
}
|
||||
}
|
||||
suspend fun yieldString(value: String) = suspendCoroutineUninterceptedOrReturn<Int> {
|
||||
it.resume(1)
|
||||
it checkType { _<Continuation<Int>>() }
|
||||
it.<!INAPPLICABLE_CANDIDATE!>resume<!>("")
|
||||
|
||||
// We can return anything here, 'suspendCoroutineUninterceptedOrReturn' is not very type-safe
|
||||
// Also we can call resume and then return the value too, but it's still just our problem
|
||||
"Not-int"
|
||||
}
|
||||
}
|
||||
|
||||
fun builder(c: suspend Controller.() -> Unit) {}
|
||||
|
||||
fun test() {
|
||||
builder {
|
||||
noParams() checkType { _<Unit>() }
|
||||
yieldString("abc") checkType { _<Int>() }
|
||||
}
|
||||
}
|
||||
-38
@@ -1,38 +0,0 @@
|
||||
// !LANGUAGE: -ReleaseCoroutines
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER -EXPERIMENTAL_FEATURE_WARNING
|
||||
// !CHECK_TYPE
|
||||
// !WITH_NEW_INFERENCE
|
||||
// SKIP_TXT
|
||||
|
||||
import kotlin.coroutines.*
|
||||
import kotlin.coroutines.intrinsics.*
|
||||
|
||||
class Controller {
|
||||
suspend fun noParams(): Unit = suspendCoroutineUninterceptedOrReturn {
|
||||
if (hashCode() % 2 == 0) {
|
||||
it.resume(Unit)
|
||||
COROUTINE_SUSPENDED
|
||||
}
|
||||
else {
|
||||
Unit
|
||||
}
|
||||
}
|
||||
suspend fun yieldString(value: String) = suspendCoroutineUninterceptedOrReturn<Int> {
|
||||
it.resume(1)
|
||||
it checkType { _<Continuation<Int>>() }
|
||||
it.<!TYPE_INFERENCE_CONFLICTING_SUBSTITUTIONS{OI}!>resume<!>(<!TYPE_MISMATCH{NI}!>""<!>)
|
||||
|
||||
// We can return anything here, 'suspendCoroutineUninterceptedOrReturn' is not very type-safe
|
||||
// Also we can call resume and then return the value too, but it's still just our problem
|
||||
"Not-int"
|
||||
}
|
||||
}
|
||||
|
||||
fun builder(c: suspend Controller.() -> Unit) {}
|
||||
|
||||
fun test() {
|
||||
builder {
|
||||
noParams() checkType { _<Unit>() }
|
||||
yieldString("abc") checkType { _<Int>() }
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// !LANGUAGE: -Coroutines -ReleaseCoroutines
|
||||
|
||||
suspend fun suspendHere(): String = "OK"
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
var result = ""
|
||||
|
||||
builder {
|
||||
suspendHere()
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// !LANGUAGE: -Coroutines -ReleaseCoroutines
|
||||
|
||||
<!UNSUPPORTED_FEATURE!>suspend<!> fun suspendHere(): String = "OK"
|
||||
|
||||
fun builder(c: <!UNSUPPORTED_FEATURE!>suspend<!> () -> Unit) {
|
||||
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
var result = ""
|
||||
|
||||
<!UNSUPPORTED_FEATURE!>builder<!> {
|
||||
suspendHere()
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
package
|
||||
|
||||
public fun box(): kotlin.String
|
||||
public fun builder(/*0*/ c: suspend () -> kotlin.Unit): kotlin.Unit
|
||||
public suspend fun suspendHere(): kotlin.String
|
||||
Reference in New Issue
Block a user