[NI] Complete call if return type contains only "good" type variables
This commit is contained in:
+20
-5
@@ -1,10 +1,25 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
fun <T> foo(): @kotlin.internal.NoInfer T = TODO()
|
||||
private object TopLevelTypeVariable {
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
fun <T> foo(): @kotlin.internal.NoInfer T = TODO()
|
||||
|
||||
fun <K> bar(k: K) {}
|
||||
fun <K> bar(k: K) {}
|
||||
|
||||
fun test() {
|
||||
bar(foo<Int>())
|
||||
fun test() {
|
||||
bar(foo<Int>())
|
||||
}
|
||||
}
|
||||
|
||||
private object NestedTypeVariable {
|
||||
class Inv<T>
|
||||
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
fun <T> foo(): Inv<@kotlin.internal.NoInfer T> = TODO()
|
||||
|
||||
fun <K> bar(p: Inv<K>) {}
|
||||
|
||||
fun test() {
|
||||
bar(foo<String>())
|
||||
}
|
||||
}
|
||||
+26
-3
@@ -1,5 +1,28 @@
|
||||
package
|
||||
|
||||
public fun </*0*/ K> bar(/*0*/ k: K): kotlin.Unit
|
||||
@kotlin.Suppress(names = {"INVISIBLE_MEMBER", "INVISIBLE_REFERENCE"}) public fun </*0*/ T> foo(): T
|
||||
public fun test(): kotlin.Unit
|
||||
private object NestedTypeVariable {
|
||||
private constructor NestedTypeVariable()
|
||||
public final fun </*0*/ K> bar(/*0*/ p: NestedTypeVariable.Inv<K>): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
@kotlin.Suppress(names = {"INVISIBLE_MEMBER", "INVISIBLE_REFERENCE"}) public final fun </*0*/ T> foo(): NestedTypeVariable.Inv<T>
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final fun test(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
public final class Inv</*0*/ T> {
|
||||
public constructor Inv</*0*/ T>()
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
private object TopLevelTypeVariable {
|
||||
private constructor TopLevelTypeVariable()
|
||||
public final fun </*0*/ K> bar(/*0*/ k: K): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
@kotlin.Suppress(names = {"INVISIBLE_MEMBER", "INVISIBLE_REFERENCE"}) public final fun </*0*/ T> foo(): T
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final fun test(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user