[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()