Files
kotlin-fork/compiler/testData/diagnostics/tests/cast/DowncastMap.kt
T
2015-05-12 19:43:17 +02:00

10 lines
210 B
Kotlin
Vendored

interface Map<K, out V>
interface 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_SMARTCAST!>p<!>[""] = 1
}
}