Files
kotlin-fork/compiler/testData/diagnostics/tests/inference/conflictingSubstitutions.fir.kt
T

21 lines
421 B
Kotlin
Vendored

// !WITH_NEW_INFERENCE
package conflictingSubstitutions
//+JDK
import java.util.*
fun <R> elemAndList(r: R, t: MutableList<R>): R = r
fun <R> R.elemAndListWithReceiver(r: R, t: MutableList<R>): R = r
fun test() {
val s = elemAndList(11, list("72"))
val u = 11.elemAndListWithReceiver(4, list("7"))
}
fun <T> list(value: T) : ArrayList<T> {
val list = ArrayList<T>()
list.add(value)
return list
}