[NI] Fix OnlyInputTypes for captured types

Uncapture projections recursively for cases when captured type is not
top-level type or first level type argument
This commit is contained in:
Pavel Kirpichenkov
2019-12-11 16:20:43 +03:00
parent 16db3a8b5f
commit 2fc79856a2
5 changed files with 49 additions and 6 deletions
@@ -0,0 +1,12 @@
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_PARAMETER
@file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
annotation class Anno
fun test(a: List<Class<Anno>>) {
strictSelect(a, emptyList<Anno>().map { it.annotationClass.java })
}
fun <@kotlin.internal.OnlyInputTypes S> strictSelect(arg1: S, arg2: S): S = TODO()
@@ -0,0 +1,11 @@
package
public fun </*0*/ @kotlin.internal.OnlyInputTypes S> strictSelect(/*0*/ arg1: S, /*1*/ arg2: S): S
public fun test(/*0*/ a: kotlin.collections.List<java.lang.Class<Anno>>): kotlin.Unit
public final annotation class Anno : kotlin.Annotation {
public constructor Anno()
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
}