# Smart-cast problem

**URL:** <https://discuss.kotlinlang.org/t/smart-cast-problem/6739>\
**Category:** Support\
**Created:** [February 22, 2018, 9:48am UTC](https://discuss.kotlinlang.org/t/smart-cast-problem/6739 "2018-02-22T09:48:24Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![aantoniadis](https://avatars.discourse-cdn.com/v4/letter/a/8dc957/32.png) [@aantoniadis](https://discuss.kotlinlang.org/u/aantoniadis)\
**Post date:** [February 22, 2018, 11:07am UTC](https://discuss.kotlinlang.org/t/smart-cast-problem/6739/7 "2018-02-22T11:07:22Z")

</div>

Hmm, I would expect subclasses of MutableList to be also mutable by contract as Kotlin makes the distinction between mutable and immutable collections. I am a bit surprised that java.util.List is equivalent to MutableList as @jstuyts says. I guess that this LSP violation comes from java interop, right?

So, is there a “safe” way to check if a list is actually mutable?

---

_[View the full topic](https://discuss.kotlinlang.org/t/smart-cast-problem/6739)._
