[NI] Remove capturing from supertypes during computation of CST

This commit is contained in:
Mikhail Zarechenskiy
2019-09-16 03:14:40 +03:00
parent e8907c078d
commit b30a9e1d3e
12 changed files with 114 additions and 11 deletions
@@ -0,0 +1,20 @@
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_EXPRESSION
// FILE: JavaTest.java
public class JavaTest {
public static Number[] createNumberArray() { return null; }
}
// FILE: test.kt
fun <K> select(x: K, y: K): K = x
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<!>
}