karelpeeters
02/28/2019, 9:14 AMfoo.map is smartcast to MutableMap, and then val immutable = foo.map is mutable too of course. In the second one foo.map is smartcast too, but the compiler doesn't go back and check all previous expressions and change their types.