<Notnull assertion issue> The following code works...
# forum
r
Notnull assertion issue The following code works as expected (ie it produces a runtime error) var qq:String? = null println(qq!!.length) //This produces a runtime NullPointerException But the following code does not compile. It complains that length does not exist. var qq:String? qq = null println(qq!!.length) //This produces a compilation error I can’t figure out why the compiler is happy with the first case, but not the second. 1 post - 1 participant <a...