Files
kotlin-fork/compiler/testData/diagnostics/tests/cast/DowncastMap.kt
T
2015-09-25 19:20:20 +03:00

10 lines
219 B
Kotlin
Vendored

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