Files
kotlin-fork/compiler/testData/diagnostics/tests/regressions/kt258.kt
T
2012-09-05 18:55:16 +04:00

11 lines
338 B
Kotlin

// KT-258 Support equality constraints in type inference
import java.util.*
fun test() {
val attributes : HashMap<String, String> = HashMap()
attributes["href"] = "1" // inference fails, but it shouldn't
}
fun <K, V> MutableMap<K, V>.set(<!UNUSED_PARAMETER!>key<!> : K, <!UNUSED_PARAMETER!>value<!> : V) {}//= this.put(key, value)