Files
kotlin-fork/compiler/testData/codegen/box/functions/kt2739.kt
T
2020-03-02 09:49:28 +03:00

11 lines
211 B
Kotlin
Vendored

// KT-2739 Error type inferred for hashSet(Pair, Pair, Pair)
fun <T> foo(vararg ts: T): T? = null
class Pair<A>(a: A)
fun box(): String {
val v = foo(Pair(1))
return if (v == null) "OK" else "fail"
}