Filter annotations while substituting compound type
This commit is contained in:
+19
-2
@@ -1,13 +1,30 @@
|
||||
//!DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
fun <R> Iterable<*>.filterIsInstance1(): List<@kotlin.internal.NoInfer R> = throw Exception()
|
||||
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
fun <R> List<*>.filterIsInstance2(): @kotlin.internal.NoInfer List<R> = throw Exception()
|
||||
|
||||
fun test(list: List<Int>) {
|
||||
list.filterIsInstance1<Int>().map { it * 2}
|
||||
list.filterIsInstance1<Int>().map { it * 2 }
|
||||
list.filterIsInstance2<Int>().filter { it > 10 }
|
||||
}
|
||||
|
||||
@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}
|
||||
foo(1).map { it * 2 }
|
||||
}
|
||||
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
fun <R> List<R>.foo(): @kotlin.internal.NoInfer R = throw Exception()
|
||||
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
fun <R> bar(r: R, f: Function1<@kotlin.internal.NoInfer R, Unit>): Nothing = throw Exception()
|
||||
|
||||
fun test1() {
|
||||
listOf("").foo().length
|
||||
bar(1) { x -> x + 1 }
|
||||
}
|
||||
+4
@@ -1,6 +1,10 @@
|
||||
package
|
||||
|
||||
@kotlin.Suppress(names = {"INVISIBLE_MEMBER", "INVISIBLE_REFERENCE"}) public fun </*0*/ R> bar(/*0*/ r: R, /*1*/ f: (R) -> kotlin.Unit): kotlin.Nothing
|
||||
@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
|
||||
public fun test1(): kotlin.Unit
|
||||
@kotlin.Suppress(names = {"INVISIBLE_MEMBER", "INVISIBLE_REFERENCE"}) public fun </*0*/ R> kotlin.Iterable<*>.filterIsInstance1(): kotlin.List<R>
|
||||
@kotlin.Suppress(names = {"INVISIBLE_MEMBER", "INVISIBLE_REFERENCE"}) public fun </*0*/ R> kotlin.List<*>.filterIsInstance2(): kotlin.List<R>
|
||||
@kotlin.Suppress(names = {"INVISIBLE_MEMBER", "INVISIBLE_REFERENCE"}) public fun </*0*/ R> kotlin.List<R>.foo(): R
|
||||
|
||||
Reference in New Issue
Block a user