Filter internal annotations for resolve in type substitutor

to avoid having List<@NoInfer Int> as a result type
of function invocation (the function returns List<@NoInfer T>)
This commit is contained in:
Svetlana Isakova
2015-10-19 20:09:39 +03:00
parent fe057f781c
commit 667f6269e4
9 changed files with 70 additions and 20 deletions
@@ -0,0 +1,13 @@
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
fun <R> Iterable<*>.filterIsInstance1(): List<@kotlin.internal.NoInfer R> = throw Exception()
fun test(list: List<Int>) {
list.filterIsInstance1<Int>().map { it * 2}
}
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
fun <R> foo(t: R): List<@kotlin.internal.NoInfer R> = throw Exception("$t")
fun test() {
foo(1).map { it * 2}
}
@@ -0,0 +1,6 @@
package
@kotlin.Suppress(names = {"INVISIBLE_MEMBER", "INVISIBLE_REFERENCE"}) public fun </*0*/ R> foo(/*0*/ t: R): kotlin.List<R>
public fun test(): kotlin.Unit
public fun test(/*0*/ list: kotlin.List<kotlin.Int>): kotlin.Unit
@kotlin.Suppress(names = {"INVISIBLE_MEMBER", "INVISIBLE_REFERENCE"}) public fun </*0*/ R> kotlin.Iterable<*>.filterIsInstance1(): kotlin.List<R>