<Map.get accepts null keys - issue is stale> Hey, ...
# forum
r
Map.get accepts null keys - issue is stale Hey, more than a year ago, I created this issue: https://youtrack.jetbrains.com/issue/KT-52231/Map.get-accepts-null-keys-although-forbidden-by-type In short: fun test() { val map = TreeMap() val key: String? = null val shouldNotCompile = map[key] } This code should not compile, because key of type String? cannot be cast to String. Yet, it...