[NI] Consider explicitly specified type argument as an input type

#KT-31860 Fixed
This commit is contained in:
Mikhail Zarechenskiy
2019-06-07 04:12:06 +03:00
parent 787a8bb9bd
commit 4ddd9f081b
5 changed files with 48 additions and 1 deletions
@@ -0,0 +1,12 @@
// !DIAGNOSTICS: -INVISIBLE_MEMBER -INVISIBLE_REFERENCE -UNUSED_PARAMETER
interface Parent
object ChildA : Parent
object ChildB : Parent
fun <@kotlin.internal.OnlyInputTypes T> select(a: T, b: T) {}
fun test() {
<!TYPE_INFERENCE_ONLY_INPUT_TYPES!>select<!>(ChildA, ChildB) // should be error
select<Any>(ChildA, ChildB) // should be ok
}
@@ -0,0 +1,24 @@
package
public fun </*0*/ @kotlin.internal.OnlyInputTypes T> select(/*0*/ a: T, /*1*/ b: T): kotlin.Unit
public fun test(): kotlin.Unit
public object ChildA : Parent {
private constructor ChildA()
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
}
public object ChildB : Parent {
private constructor ChildB()
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
}
public interface Parent {
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
}