[NI] Improve CST algorithm to handle non-fixed variables
#KT-32456 Fixed #KT-32423 Fixed #KT-32818 Fixed #KT-33197 Fixed
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
// WITH_RUNTIME
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
|
||||
fun test() {
|
||||
fun returnMutableList(): MutableList<Int>? = null
|
||||
fun returnsList(): List<Int>? = null
|
||||
|
||||
var mutableList: MutableList<Int>? = null
|
||||
var list: List<Int>? = null
|
||||
|
||||
mutableListOf<Int>().addAll(returnMutableList() ?: emptyList<Int>())
|
||||
mutableListOf<Int>().addAll(returnsList() ?: emptyList())
|
||||
mutableListOf<Int>().addAll(list ?: emptyList())
|
||||
|
||||
mutableListOf<Int>().addAll(returnMutableList() ?: emptyList())
|
||||
mutableListOf<Int>().addAll(mutableList ?: emptyList())
|
||||
mutableListOf<Int>().addAll(null ?: emptyList())
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
test()
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user