Kotlin, smart cast is impossible because of complex expression : <p>I have this code:</p>

<pre><code>// allocate one mesh
pScene.mNumMeshes = 1
pScene.mMeshes = mutableListOf(AiMesh())
val pMesh = pScene.mMeshes[0]
</code></pre>

<p>Where <code>mMeshes</code> is a parameter of type </p>

<p><code>var mMeshes: MutableList&lt;AiMesh&gt;? = null,</code></p>

<p>Compilers complains on the last row, where I try to declare <code>pMesh</code></p>

<blockquote>
  <p>Smart cast to <code>MutableList&lt;AiMesh&gt;</code> is impossible because <code>pScene.mMeshes</code> is a complex expression</p>
</blockquote>

<p>What's the problem?</p>
