NI: don't filter flexible types during CST calculation and force return as result the first of such types

^KT-35658 Fixed
This commit is contained in:
Victor Petukhov
2019-12-19 19:48:38 +03:00
parent 51424ec598
commit 4309f53e11
10 changed files with 1198 additions and 17 deletions
@@ -16,5 +16,5 @@ fun <R> foo(f: () -> R): R = f()
fun test(n: Number) {
val a = select(foo { JavaTest.createNumberArray() }, emptyArray())
<!DEBUG_INFO_EXPRESSION_TYPE("(kotlin.Array<(kotlin.Number..kotlin.Number?)>..kotlin.Array<out (kotlin.Number..kotlin.Number?)>?)")!>a<!>
<!DEBUG_INFO_EXPRESSION_TYPE("(kotlin.Array<(kotlin.Number..kotlin.Number?)>..kotlin.Array<(kotlin.Number..kotlin.Number?)>?)")!>a<!>
}