Completely rewrite reifiedIntTypeAnalysis, making it more streamline

and easy to understand and optimize if it would be a bottleneck.
Use LVT to get information of refined int type in one specific case

 #KT-38925 Fixed
This commit is contained in:
Ilmir Usmanov
2020-05-25 22:35:50 +02:00
parent 0e908b720d
commit 1ed4324613
20 changed files with 478 additions and 226 deletions
@@ -0,0 +1,29 @@
// 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
}