Adjust coroutines test data to changing the default LV to 1.3
This commit is contained in:
committed by
Ilya Gorbunov
parent
f594cb22e8
commit
c6eaaac877
+5
-6
@@ -12,10 +12,9 @@ suspend fun foo(data: Data, body: suspend (Data) -> Unit) {
|
||||
body(data)
|
||||
}
|
||||
|
||||
// METHOD : DataClassKt$test$2.doResume(Ljava/lang/Object;Ljava/lang/Throwable;)Ljava/lang/Object;
|
||||
// METHOD : DataClassKt$test$2.invokeSuspend(Ljava/lang/Object;)Ljava/lang/Object;
|
||||
// VARIABLE : NAME=this TYPE=LDataClassKt$test$2; INDEX=0
|
||||
// VARIABLE : NAME=data TYPE=Ljava/lang/Object; INDEX=1
|
||||
// VARIABLE : NAME=throwable TYPE=Ljava/lang/Throwable; INDEX=2
|
||||
// VARIABLE : NAME=$x_param_y_param TYPE=LData; INDEX=3
|
||||
// VARIABLE : NAME=x_param TYPE=Ljava/lang/String; INDEX=4
|
||||
// VARIABLE : NAME=y_param TYPE=I INDEX=5
|
||||
// VARIABLE : NAME=result TYPE=Ljava/lang/Object; INDEX=1
|
||||
// VARIABLE : NAME=$x_param_y_param TYPE=LData; INDEX=2
|
||||
// VARIABLE : NAME=x_param TYPE=Ljava/lang/String; INDEX=3
|
||||
// VARIABLE : NAME=y_param TYPE=I INDEX=4
|
||||
|
||||
Vendored
+6
-7
@@ -18,11 +18,10 @@ suspend fun B.bar(): String {
|
||||
|
||||
suspend fun test() = B.bar()
|
||||
|
||||
// METHOD : ExtensionComponentsKt$bar$3.doResume(Ljava/lang/Object;Ljava/lang/Throwable;)Ljava/lang/Object;
|
||||
// METHOD : ExtensionComponentsKt$bar$3.invokeSuspend(Ljava/lang/Object;)Ljava/lang/Object;
|
||||
// VARIABLE : NAME=this TYPE=LExtensionComponentsKt$bar$3; INDEX=0
|
||||
// VARIABLE : NAME=data TYPE=Ljava/lang/Object; INDEX=1
|
||||
// VARIABLE : NAME=throwable TYPE=Ljava/lang/Throwable; INDEX=2
|
||||
// VARIABLE : NAME=$x_param_y_param_z_param TYPE=LA; INDEX=3
|
||||
// VARIABLE : NAME=x_param TYPE=Ljava/lang/String; INDEX=4
|
||||
// VARIABLE : NAME=y_param TYPE=Ljava/lang/String; INDEX=5
|
||||
// VARIABLE : NAME=z_param TYPE=I INDEX=6
|
||||
// VARIABLE : NAME=result TYPE=Ljava/lang/Object; INDEX=1
|
||||
// VARIABLE : NAME=$x_param_y_param_z_param TYPE=LA; INDEX=2
|
||||
// VARIABLE : NAME=x_param TYPE=Ljava/lang/String; INDEX=3
|
||||
// VARIABLE : NAME=y_param TYPE=Ljava/lang/String; INDEX=4
|
||||
// VARIABLE : NAME=z_param TYPE=I INDEX=5
|
||||
|
||||
+5
-6
@@ -7,10 +7,9 @@ suspend fun <X, Y> foo(a: A<X, Y>, block: suspend (A<X, Y>) -> String) = block(a
|
||||
|
||||
suspend fun test() = foo(A("OK", 1)) { (x_param, y_param) -> x_param + (y_param.toString()) }
|
||||
|
||||
// METHOD : GenericKt$test$2.doResume(Ljava/lang/Object;Ljava/lang/Throwable;)Ljava/lang/Object;
|
||||
// METHOD : GenericKt$test$2.invokeSuspend(Ljava/lang/Object;)Ljava/lang/Object;
|
||||
// VARIABLE : NAME=this TYPE=LGenericKt$test$2; INDEX=0
|
||||
// VARIABLE : NAME=data TYPE=Ljava/lang/Object; INDEX=1
|
||||
// VARIABLE : NAME=throwable TYPE=Ljava/lang/Throwable; INDEX=2
|
||||
// VARIABLE : NAME=$x_param_y_param TYPE=LA; INDEX=3
|
||||
// VARIABLE : NAME=x_param TYPE=Ljava/lang/String; INDEX=4
|
||||
// VARIABLE : NAME=y_param TYPE=I INDEX=5
|
||||
// VARIABLE : NAME=result TYPE=Ljava/lang/Object; INDEX=1
|
||||
// VARIABLE : NAME=$x_param_y_param TYPE=LA; INDEX=2
|
||||
// VARIABLE : NAME=x_param TYPE=Ljava/lang/String; INDEX=3
|
||||
// VARIABLE : NAME=y_param TYPE=I INDEX=4
|
||||
|
||||
+2
-2
@@ -6,9 +6,9 @@ suspend inline fun foo(a: A, block: suspend (A) -> String): String = block(a)
|
||||
|
||||
suspend fun test() = foo(A("O", "K")) { (x_param, y_param) -> x_param + y_param }
|
||||
|
||||
// METHOD : InlineKt.test(Lkotlin/coroutines/experimental/Continuation;)Ljava/lang/Object;
|
||||
// METHOD : InlineKt.test(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
// VARIABLE : NAME=<name for destructuring parameter 0> TYPE=LA; INDEX=3
|
||||
// VARIABLE : NAME=continuation TYPE=Lkotlin/coroutines/experimental/Continuation; INDEX=2
|
||||
// VARIABLE : NAME=continuation TYPE=Lkotlin/coroutines/Continuation; INDEX=2
|
||||
// VARIABLE : NAME=$x_param_y_param TYPE=LA; INDEX=5
|
||||
// VARIABLE : NAME=x_param TYPE=Ljava/lang/String; INDEX=6
|
||||
// VARIABLE : NAME=y_param TYPE=Ljava/lang/String; INDEX=7
|
||||
|
||||
+5
-6
@@ -5,10 +5,9 @@ suspend fun foo(a: A, block: suspend (Int, A, String) -> String): String = block
|
||||
|
||||
suspend fun test() = foo(A("O", "K")) { i_param, (x_param, y_param), v_param -> i_param.toString() + x_param + y_param + v_param }
|
||||
|
||||
// METHOD : OtherParametersKt$test$2.doResume(Ljava/lang/Object;Ljava/lang/Throwable;)Ljava/lang/Object;
|
||||
// METHOD : OtherParametersKt$test$2.invokeSuspend(Ljava/lang/Object;)Ljava/lang/Object;
|
||||
// VARIABLE : NAME=this TYPE=LOtherParametersKt$test$2; INDEX=0
|
||||
// VARIABLE : NAME=data TYPE=Ljava/lang/Object; INDEX=1
|
||||
// VARIABLE : NAME=throwable TYPE=Ljava/lang/Throwable; INDEX=2
|
||||
// VARIABLE : NAME=$x_param_y_param TYPE=LA; INDEX=3
|
||||
// VARIABLE : NAME=x_param TYPE=Ljava/lang/String; INDEX=4
|
||||
// VARIABLE : NAME=y_param TYPE=Ljava/lang/String; INDEX=5
|
||||
// VARIABLE : NAME=result TYPE=Ljava/lang/Object; INDEX=1
|
||||
// VARIABLE : NAME=$x_param_y_param TYPE=LA; INDEX=2
|
||||
// VARIABLE : NAME=x_param TYPE=Ljava/lang/String; INDEX=3
|
||||
// VARIABLE : NAME=y_param TYPE=Ljava/lang/String; INDEX=4
|
||||
|
||||
+5
-6
@@ -10,10 +10,9 @@ suspend fun foo(a: A, block: suspend (A) -> String): String = block(a)
|
||||
|
||||
suspend fun test() = foo(A()) { (x_param, _, y_param) -> x_param + y_param }
|
||||
|
||||
// METHOD : UnderscoreNamesKt$test$2.doResume(Ljava/lang/Object;Ljava/lang/Throwable;)Ljava/lang/Object;
|
||||
// METHOD : UnderscoreNamesKt$test$2.invokeSuspend(Ljava/lang/Object;)Ljava/lang/Object;
|
||||
// VARIABLE : NAME=this TYPE=LUnderscoreNamesKt$test$2; INDEX=0
|
||||
// VARIABLE : NAME=data TYPE=Ljava/lang/Object; INDEX=1
|
||||
// VARIABLE : NAME=throwable TYPE=Ljava/lang/Throwable; INDEX=2
|
||||
// VARIABLE : NAME=$x_param_$_$_y_param TYPE=LA; INDEX=3
|
||||
// VARIABLE : NAME=x_param TYPE=Ljava/lang/String; INDEX=4
|
||||
// VARIABLE : NAME=y_param TYPE=Ljava/lang/String; INDEX=5
|
||||
// VARIABLE : NAME=result TYPE=Ljava/lang/Object; INDEX=1
|
||||
// VARIABLE : NAME=$x_param_$_$_y_param TYPE=LA; INDEX=2
|
||||
// VARIABLE : NAME=x_param TYPE=Ljava/lang/String; INDEX=3
|
||||
// VARIABLE : NAME=y_param TYPE=Ljava/lang/String; INDEX=4
|
||||
|
||||
+4
-7
@@ -12,19 +12,16 @@ inline fun go(f: () -> String) = f()
|
||||
// FILE: box.kt
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlin.coroutines.experimental.*
|
||||
import kotlin.coroutines.experimental.intrinsics.*
|
||||
import kotlin.coroutines.*
|
||||
import kotlin.coroutines.intrinsics.*
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(object: Continuation<Unit> {
|
||||
override val context: CoroutineContext
|
||||
get() = EmptyCoroutineContext
|
||||
|
||||
override fun resume(value: Unit) {
|
||||
}
|
||||
|
||||
override fun resumeWithException(exception: Throwable) {
|
||||
throw exception
|
||||
override fun resumeWith(result: SuccessOrFailure<Unit>) {
|
||||
result.getOrThrow()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
+4
-7
@@ -10,19 +10,16 @@ inline suspend fun go(f: () -> String) = f()
|
||||
// FILE: box.kt
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlin.coroutines.experimental.*
|
||||
import kotlin.coroutines.experimental.intrinsics.*
|
||||
import kotlin.coroutines.*
|
||||
import kotlin.coroutines.intrinsics.*
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(object: Continuation<Unit> {
|
||||
override val context: CoroutineContext
|
||||
get() = EmptyCoroutineContext
|
||||
|
||||
override fun resume(value: Unit) {
|
||||
}
|
||||
|
||||
override fun resumeWithException(exception: Throwable) {
|
||||
throw exception
|
||||
override fun resumeWith(result: SuccessOrFailure<Unit>) {
|
||||
result.getOrThrow()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
+7
-10
@@ -4,8 +4,8 @@
|
||||
// WITH_COROUTINES
|
||||
// NO_CHECK_LAMBDA_INLINING
|
||||
|
||||
import kotlin.coroutines.experimental.*
|
||||
import kotlin.coroutines.experimental.intrinsics.*
|
||||
import kotlin.coroutines.*
|
||||
import kotlin.coroutines.intrinsics.*
|
||||
|
||||
var result = "FAIL"
|
||||
var i = 0
|
||||
@@ -30,24 +30,21 @@ inline suspend fun inlineMe() {
|
||||
|
||||
// FILE: inlineSite.kt
|
||||
|
||||
import kotlin.coroutines.experimental.*
|
||||
import kotlin.coroutines.experimental.intrinsics.*
|
||||
import kotlin.coroutines.*
|
||||
import kotlin.coroutines.intrinsics.*
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
val continuation = object: helpers.ContinuationAdapter<Unit>() {
|
||||
val continuation = object: Continuation<Unit> {
|
||||
override val context: CoroutineContext
|
||||
get() = EmptyCoroutineContext
|
||||
|
||||
override fun resume(value: Unit) {
|
||||
override fun resumeWith(r: SuccessOrFailure<Unit>) {
|
||||
r.getOrThrow()
|
||||
proceed = {
|
||||
result = "OK"
|
||||
finished = true
|
||||
}
|
||||
}
|
||||
|
||||
override fun resumeWithException(exception: Throwable) {
|
||||
throw exception
|
||||
}
|
||||
}
|
||||
c.startCoroutine(continuation)
|
||||
}
|
||||
|
||||
+7
-10
@@ -4,8 +4,8 @@
|
||||
// WITH_COROUTINES
|
||||
// NO_CHECK_LAMBDA_INLINING
|
||||
|
||||
import kotlin.coroutines.experimental.*
|
||||
import kotlin.coroutines.experimental.intrinsics.*
|
||||
import kotlin.coroutines.*
|
||||
import kotlin.coroutines.intrinsics.*
|
||||
|
||||
var result = "FAIL"
|
||||
var i = 0
|
||||
@@ -28,24 +28,21 @@ inline suspend fun inlineMe() {
|
||||
|
||||
// FILE: inlineSite.kt
|
||||
|
||||
import kotlin.coroutines.experimental.*
|
||||
import kotlin.coroutines.experimental.intrinsics.*
|
||||
import kotlin.coroutines.*
|
||||
import kotlin.coroutines.intrinsics.*
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
val continuation = object: helpers.ContinuationAdapter<Unit>() {
|
||||
val continuation = object: Continuation<Unit> {
|
||||
override val context: CoroutineContext
|
||||
get() = EmptyCoroutineContext
|
||||
|
||||
override fun resume(value: Unit) {
|
||||
override fun resumeWith(r: SuccessOrFailure<Unit>) {
|
||||
r.getOrThrow()
|
||||
proceed = {
|
||||
result = "OK"
|
||||
finished = true
|
||||
}
|
||||
}
|
||||
|
||||
override fun resumeWithException(exception: Throwable) {
|
||||
throw exception
|
||||
}
|
||||
}
|
||||
c.startCoroutine(continuation)
|
||||
}
|
||||
|
||||
+3
-3
@@ -4,8 +4,8 @@
|
||||
"visibility": "public",
|
||||
"class": "C",
|
||||
"members": [
|
||||
{"visibility": "public", "declaration": "open suspend fun foo(): V", "name": "foo", "desc": "(Lkotlin/coroutines/experimental/Continuation;)Ljava/lang/Object;"},
|
||||
{"visibility": "public", "declaration": "open suspend fun foo(): V", "name": "foo$suspendImpl", "desc": "(LC;Lkotlin/coroutines/experimental/Continuation;)Ljava/lang/Object;"},
|
||||
{"visibility": "public", "declaration": "open suspend fun foo(): V", "name": "foo", "desc": "(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;"},
|
||||
{"visibility": "public", "declaration": "open suspend fun foo(): V", "name": "foo$suspendImpl", "desc": "(LC;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;"},
|
||||
{"visibility": "public", "declaration": "constructor C<V>()", "name": "<init>", "desc": "()V"}
|
||||
]
|
||||
},
|
||||
@@ -38,7 +38,7 @@
|
||||
"visibility": "public",
|
||||
"class": "A",
|
||||
"members": [
|
||||
{"visibility": "public", "declaration": "abstract suspend fun foo(): T", "name": "foo", "desc": "(Lkotlin/coroutines/experimental/Continuation;)Ljava/lang/Object;"}
|
||||
{"visibility": "public", "declaration": "abstract suspend fun foo(): T", "name": "foo", "desc": "(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;"}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
@@ -5,9 +5,10 @@
|
||||
"class": "SuspendLambdaKt$invokeCoroutineBuilder$1",
|
||||
"members": [
|
||||
{"visibility": "local", "declaration": "<this>", "name": "p$", "desc": "Ljava/lang/Object;"},
|
||||
{"name": "doResume", "desc": "(Ljava/lang/Object;Ljava/lang/Throwable;)Ljava/lang/Object;"},
|
||||
{"visibility": "local", "declaration": "final suspend fun kotlin.Any.<anonymous>(): kotlin.Unit", "name": "<init>", "desc": "(Lkotlin/coroutines/experimental/Continuation;)V"},
|
||||
{"name": "create", "desc": "(Ljava/lang/Object;Lkotlin/coroutines/experimental/Continuation;)Lkotlin/coroutines/experimental/Continuation;"},
|
||||
{"name": "invokeSuspend", "desc": "(Ljava/lang/Object;)Ljava/lang/Object;"},
|
||||
{"visibility": "local", "declaration": "final suspend fun kotlin.Any.<anonymous>(): kotlin.Unit", "name": "<init>", "desc": "(Lkotlin/coroutines/Continuation;)V"},
|
||||
{"name": "label", "desc": "I"},
|
||||
{"name": "create", "desc": "(Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Lkotlin/coroutines/Continuation;"},
|
||||
{"visibility": "local", "declaration": "final suspend fun kotlin.Any.<anonymous>(): kotlin.Unit", "name": "invoke", "desc": "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;"}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"visibility": "public",
|
||||
"class": "B",
|
||||
"members": [
|
||||
{"visibility": "public", "declaration": "open suspend fun foo(): kotlin.Boolean", "name": "foo", "desc": "(Lkotlin/coroutines/experimental/Continuation;)Ljava/lang/Object;"},
|
||||
{"visibility": "public", "declaration": "open suspend fun foo(): kotlin.Boolean", "name": "foo", "desc": "(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;"},
|
||||
{"visibility": "public", "declaration": "constructor B()", "name": "<init>", "desc": "()V"}
|
||||
]
|
||||
},
|
||||
@@ -29,7 +29,7 @@
|
||||
"visibility": "public",
|
||||
"class": "A",
|
||||
"members": [
|
||||
{"visibility": "public", "declaration": "abstract suspend fun foo(): kotlin.Boolean", "name": "foo", "desc": "(Lkotlin/coroutines/experimental/Continuation;)Ljava/lang/Object;"}
|
||||
{"visibility": "public", "declaration": "abstract suspend fun foo(): kotlin.Boolean", "name": "foo", "desc": "(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;"}
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -37,7 +37,7 @@
|
||||
"visibility": "public",
|
||||
"class": "C",
|
||||
"members": [
|
||||
{"visibility": "public", "declaration": "final suspend fun foo(): kotlin.Boolean", "name": "foo", "desc": "(Lkotlin/coroutines/experimental/Continuation;)Ljava/lang/Object;"},
|
||||
{"visibility": "public", "declaration": "final suspend fun foo(): kotlin.Boolean", "name": "foo", "desc": "(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;"},
|
||||
{"visibility": "public", "declaration": "constructor C()", "name": "<init>", "desc": "()V"}
|
||||
]
|
||||
}
|
||||
|
||||
+11
-11
@@ -1,36 +1,36 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// SKIP_TXT
|
||||
|
||||
import kotlin.coroutines.experimental.*
|
||||
import kotlin.coroutines.*
|
||||
|
||||
fun ordinal() {
|
||||
kotlin.coroutines.experimental.<!ILLEGAL_SUSPEND_PROPERTY_ACCESS!>coroutineContext<!>
|
||||
kotlin.coroutines.<!ILLEGAL_SUSPEND_PROPERTY_ACCESS!>coroutineContext<!>
|
||||
<!ILLEGAL_SUSPEND_PROPERTY_ACCESS!>coroutineContext<!>
|
||||
}
|
||||
|
||||
suspend fun named() {
|
||||
kotlin.coroutines.experimental.coroutineContext
|
||||
kotlin.coroutines.coroutineContext
|
||||
coroutineContext
|
||||
}
|
||||
|
||||
class A {
|
||||
val coroutineContextNew = kotlin.coroutines.experimental.<!ILLEGAL_SUSPEND_PROPERTY_ACCESS!>coroutineContext<!>
|
||||
val coroutineContextNew = kotlin.coroutines.<!ILLEGAL_SUSPEND_PROPERTY_ACCESS!>coroutineContext<!>
|
||||
val context = <!ILLEGAL_SUSPEND_PROPERTY_ACCESS!>coroutineContext<!>
|
||||
}
|
||||
|
||||
class Controller {
|
||||
fun ordinal() {
|
||||
kotlin.coroutines.experimental.<!ILLEGAL_SUSPEND_PROPERTY_ACCESS!>coroutineContext<!>
|
||||
kotlin.coroutines.<!ILLEGAL_SUSPEND_PROPERTY_ACCESS!>coroutineContext<!>
|
||||
<!ILLEGAL_SUSPEND_PROPERTY_ACCESS!>coroutineContext<!>
|
||||
}
|
||||
|
||||
suspend fun named() {
|
||||
kotlin.coroutines.experimental.coroutineContext
|
||||
kotlin.coroutines.coroutineContext
|
||||
coroutineContext
|
||||
}
|
||||
|
||||
suspend fun severalArgs(s: String, a: Any) {
|
||||
kotlin.coroutines.experimental.coroutineContext
|
||||
kotlin.coroutines.coroutineContext
|
||||
coroutineContext
|
||||
}
|
||||
}
|
||||
@@ -42,12 +42,12 @@ fun builderSeveralArgs(c: (Int, Int, Int) -> CoroutineContext) = {}
|
||||
fun builderSuspendSeveralArgs(c: suspend (Int, Int, Int) -> CoroutineContext) = {}
|
||||
|
||||
fun test() {
|
||||
builder { kotlin.coroutines.experimental.<!ILLEGAL_SUSPEND_PROPERTY_ACCESS!>coroutineContext<!> }
|
||||
builder { kotlin.coroutines.<!ILLEGAL_SUSPEND_PROPERTY_ACCESS!>coroutineContext<!> }
|
||||
builder { <!ILLEGAL_SUSPEND_PROPERTY_ACCESS!>coroutineContext<!> }
|
||||
builderSuspend { kotlin.coroutines.experimental.coroutineContext }
|
||||
builderSuspend { kotlin.coroutines.coroutineContext }
|
||||
builderSuspend { coroutineContext }
|
||||
builderSeveralArgs { _, _, _ -> kotlin.coroutines.experimental.<!ILLEGAL_SUSPEND_PROPERTY_ACCESS!>coroutineContext<!> }
|
||||
builderSeveralArgs { _, _, _ -> kotlin.coroutines.<!ILLEGAL_SUSPEND_PROPERTY_ACCESS!>coroutineContext<!> }
|
||||
builderSeveralArgs { _, _, _ -> <!ILLEGAL_SUSPEND_PROPERTY_ACCESS!>coroutineContext<!> }
|
||||
builderSuspendSeveralArgs { _, _, _ -> kotlin.coroutines.experimental.coroutineContext }
|
||||
builderSuspendSeveralArgs { _, _, _ -> kotlin.coroutines.coroutineContext }
|
||||
builderSuspendSeveralArgs { _, _, _ -> coroutineContext }
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// !LANGUAGE: -Coroutines
|
||||
// !LANGUAGE: -Coroutines -ReleaseCoroutines
|
||||
|
||||
<!UNSUPPORTED_FEATURE!>suspend<!> fun suspendHere(): String = "OK"
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// !LANGUAGE: warn:Coroutines
|
||||
// !LANGUAGE: warn:Coroutines -ReleaseCoroutines
|
||||
|
||||
<!EXPERIMENTAL_FEATURE_WARNING!>suspend<!> fun suspendHere(): String = "OK"
|
||||
|
||||
|
||||
+3
-3
@@ -1,8 +1,8 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// !CHECK_TYPE
|
||||
// SKIP_TXT
|
||||
import kotlin.coroutines.experimental.*
|
||||
import kotlin.coroutines.experimental.intrinsics.*
|
||||
import kotlin.coroutines.*
|
||||
import kotlin.coroutines.intrinsics.*
|
||||
|
||||
class Controller {
|
||||
suspend fun noParams(): Unit = suspendCoroutineUninterceptedOrReturn {
|
||||
@@ -17,7 +17,7 @@ class Controller {
|
||||
suspend fun yieldString(value: String) = suspendCoroutineUninterceptedOrReturn<Int> {
|
||||
it.resume(1)
|
||||
it checkType { _<Continuation<Int>>() }
|
||||
it.resume(<!TYPE_MISMATCH!>""<!>)
|
||||
it.<!TYPE_INFERENCE_CONFLICTING_SUBSTITUTIONS!>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
|
||||
|
||||
Vendored
+1
-1
@@ -1,5 +1,5 @@
|
||||
// !API_VERSION: 1.1
|
||||
// !LANGUAGE: +Coroutines
|
||||
// !LANGUAGE: +Coroutines -ReleaseCoroutines
|
||||
// SKIP_TXT
|
||||
|
||||
import kotlin.coroutines.experimental.*
|
||||
|
||||
Vendored
+2
-2
@@ -4,11 +4,11 @@
|
||||
import kotlin.coroutines.experimental.*
|
||||
import kotlin.coroutines.experimental.intrinsics.*
|
||||
|
||||
<!UNSUPPORTED_FEATURE!>suspend<!> fun foo(): Unit = <!UNRESOLVED_REFERENCE!>suspendCoroutine<!> {
|
||||
<!UNSUPPORTED!>suspend<!> fun foo(): Unit = <!UNRESOLVED_REFERENCE!>suspendCoroutine<!> {
|
||||
<!UNRESOLVED_REFERENCE!>it<!>.<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>resume<!>(Unit)
|
||||
}
|
||||
|
||||
<!UNSUPPORTED_FEATURE!>suspend<!> fun bar(): Unit = <!UNRESOLVED_REFERENCE!>suspendCoroutineUninterceptedOrReturn<!> {
|
||||
<!UNSUPPORTED!>suspend<!> fun bar(): Unit = <!UNRESOLVED_REFERENCE!>suspendCoroutineUninterceptedOrReturn<!> {
|
||||
<!UNRESOLVED_REFERENCE!>it<!>.<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>resume<!>(Unit)
|
||||
<!UNRESOLVED_REFERENCE!>COROUTINE_SUSPENDED<!>
|
||||
}
|
||||
|
||||
+1
-1
@@ -33,5 +33,5 @@ interface C : A {
|
||||
// FILE: J.java
|
||||
|
||||
public interface J extends A {
|
||||
Object foo(kotlin.coroutines.experimental.Continuation<kotlin.Unit> y);
|
||||
Object foo(kotlin.coroutines.Continuation<kotlin.Unit> y);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// !LANGUAGE: -Coroutines
|
||||
// !LANGUAGE: -Coroutines -ReleaseCoroutines
|
||||
|
||||
<!UNSUPPORTED_FEATURE!>suspend<!> fun suspendHere(): String = "OK"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user