title: Kotlin "Smart cast is impossible, because the property could have been changed by this time"
body: <p>Why Android Studio show error when I use No.2 script. 
  I found no different between 1 and 2. </p>
  
  <pre><code>class Adapter {
      var nameList : ArrayList&lt;String&gt;? = null
  }
  
  class Program {
      private fun send() {
          val list: ArrayList&lt;String&gt; = ArrayList()
          val adapter = Adapter()
  
  // Case 1
          var otherList = adapter.nameList
          if (otherList != null) {
              list.addAll(otherList) // &lt;--- no error
          }
  
  // Case 2
          if (adapter.nameList!=null) {
              list.addAll(adapter.nameList) // &lt;--- Error here
              // Smart cast to 'kotlin.collections.ArrayList&lt;String&gt; /* = java.util.ArrayList&lt;String&gt; */' is impossible, because 'adapter.nameList' is a mutable property that could have been changed by this time
          }
      }
  }
  </code></pre>
  
  <p>Please explain this case</p>