Files
kotlin-fork/compiler/testData/diagnostics/tests/inference/upperBounds/conflictingSubstitutionsFromUpperBound.kt
T

14 lines
297 B
Kotlin
Vendored

// FIR_IDENTICAL
// !CHECK_TYPE
package g
import java.util.HashSet
fun <T, C: Collection<T>> convert(src: Collection<T>, dest: C): C = throw Exception("$src $dest")
fun test(l: List<Int>) {
//todo should be inferred
val r = convert(l, HashSet())
r checkType { _<HashSet<Int>>() }
}