[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<!>
}
@@ -0,0 +1,15 @@
package
public fun </*0*/ R> foo(/*0*/ f: () -> R): R
public fun </*0*/ K> select(/*0*/ x: K, /*1*/ y: K): K
public fun test(/*0*/ n: kotlin.Number): kotlin.Unit
public open class JavaTest {
public constructor JavaTest()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
// Static members
public open fun createNumberArray(): kotlin.Array<(out) kotlin.Number!>!
}