Files
kotlin-fork/compiler/testData/diagnostics/tests/cast/DowncastMap.kt
T
2013-12-11 19:53:50 +04:00

10 lines
201 B
Kotlin

trait Map<K, out V>
trait MutableMap<K, V>: Map<K, V> {
fun set(k: K, v: V)
}
fun p(p: Map<String, Int>) {
if (p is MutableMap<String, Int>) {
<!DEBUG_INFO_AUTOCAST!>p<!>[""] = 1
}
}