Revert "Completely rewrite reifiedIntTypeAnalysis, making it more streamline"
This reverts commit 1ed4324613.
Otherwise, bootstrap is broken.
This commit is contained in:
@@ -1,29 +0,0 @@
|
||||
// KJS_WITH_FULL_RUNTIME
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
// COMMON_COROUTINES_TEST
|
||||
import helpers.*
|
||||
import COROUTINES_PACKAGE.*
|
||||
import COROUTINES_PACKAGE.intrinsics.*
|
||||
|
||||
fun foo() {
|
||||
bar {
|
||||
val p = false
|
||||
baz(p, "".ifEmpty { "OK" })
|
||||
}
|
||||
}
|
||||
|
||||
var res = "FAIL"
|
||||
|
||||
fun bar(f: suspend () -> Unit) {
|
||||
f.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
fun baz(p: Boolean, s: String?) {
|
||||
res = s!!
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
foo()
|
||||
return res
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
// FILE: test.kt
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
// WITH_REFLECT
|
||||
|
||||
import COROUTINES_PACKAGE.*
|
||||
import helpers.*
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
class Delegate {
|
||||
operator fun getValue(thisRef: Any?, property: KProperty<*>): String {
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
interface SuspendRunnable {
|
||||
suspend fun run(): String
|
||||
}
|
||||
|
||||
suspend inline fun test(crossinline c: suspend (String) -> String): String {
|
||||
val sr = object : SuspendRunnable {
|
||||
val ok by Delegate()
|
||||
override suspend fun run(): String {
|
||||
return c(ok)
|
||||
}
|
||||
}
|
||||
return sr.run()
|
||||
}
|
||||
|
||||
// FILE: box.kt
|
||||
// COMMON_COROUTINES_TEST
|
||||
|
||||
import COROUTINES_PACKAGE.*
|
||||
import helpers.*
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
suspend fun dummy() {}
|
||||
|
||||
fun box(): String {
|
||||
var res: String = "FAIL"
|
||||
builder {
|
||||
res = test { it }
|
||||
}
|
||||
return res
|
||||
}
|
||||
Reference in New Issue
Block a user