Files
kotlin-fork/compiler/testData/resolvedCalls/arguments/genericCalls/inferredParameter.txt
T
Mikhail Zarechenskiy 191fb02bf6 [NI] Consider intersection type with number type as Nothing
Currently, only for "in": In<in Int & A> == In<in Nothing> == In<*>

 #KT-37302 Fixed
2020-03-23 16:39:21 +03:00

23 lines
645 B
Plaintext
Vendored

fun <T> foo(t: T, l: List<T>) {}
fun use(vararg a: Any?) = a
fun test(a: Any, ls: List<String>) {
use(<caret>foo(11, ls))
}
Resolved call:
Candidate descriptor: fun <T> foo(t: T, l: List<T>): Unit defined in root package
Resulting descriptor: fun <T> foo(t: {Comparable<*> & java.io.Serializable}, l: List<{Comparable<*> & java.io.Serializable}>): Unit defined in root package
Explicit receiver kind = NO_EXPLICIT_RECEIVER
Dispatch receiver = NO_RECEIVER
Extension receiver = NO_RECEIVER
Value arguments mapping:
SUCCESS t : {Comparable<*> & java.io.Serializable} = 11
SUCCESS l : List<{Comparable<*> & java.io.Serializable}> = ls