Smart cast to ‘Type’ is impossible, because ‘variable’ is a mutable property that could have been changed by this time

And the Kotlin newbie asks, “why won’t the following code compile?”: var left: Node? = null fun show() { if (left != null) { queue.add(left) // ERROR HERE } } Smart cast to ‘Node’ is impossible, because ‘left’ is a mutable property that could have been changed by this time I get that left is … Read more