[NI] Remove failing codegen tests and add similar diagnostic one
These tests were added for suspend-conversions, it worked only
with new inference, but implementation was incorrect and had other
bugs, which were fixed in 1ac25259.
Support of suspend-conversions will be addressed later with a different
implementation (#KT-30703)
This commit is contained in:
-38
@@ -1,38 +0,0 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// IGNORE_BACKEND: NATIVE
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// IGNORE_BACKEND: JS
|
||||
// NO_CHECK_LAMBDA_INLINING
|
||||
// FILE: test.kt
|
||||
// We cannot use COMMON_COROUTINES_TEST here due to !LANGUAGE directive
|
||||
// TODO: Fix this
|
||||
|
||||
inline fun go(f: () -> String) = f()
|
||||
|
||||
// FILE: box.kt
|
||||
// WITH_RUNTIME
|
||||
|
||||
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 resumeWith(result: Result<Unit>) {
|
||||
result.getOrThrow()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
suspend fun String.id(): String = this
|
||||
|
||||
fun box(): String {
|
||||
val x = "OK"
|
||||
var res = "FAIL"
|
||||
builder {
|
||||
res = go(x::id)
|
||||
}
|
||||
return res
|
||||
}
|
||||
-36
@@ -1,36 +0,0 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// IGNORE_BACKEND: NATIVE
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// IGNORE_BACKEND: JS
|
||||
// NO_CHECK_LAMBDA_INLINING
|
||||
// FILE: test.kt
|
||||
|
||||
inline suspend fun go(f: () -> String) = f()
|
||||
|
||||
// FILE: box.kt
|
||||
// WITH_RUNTIME
|
||||
|
||||
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 resumeWith(result: Result<Unit>) {
|
||||
result.getOrThrow()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
suspend fun String.id(): String = this
|
||||
|
||||
fun box(): String {
|
||||
val x = "OK"
|
||||
var res = "FAIL"
|
||||
builder {
|
||||
res = go(x::id)
|
||||
}
|
||||
return res
|
||||
}
|
||||
Reference in New Issue
Block a user