allan.conda
06/08/2022, 10:13 AMlet hides the uninitialized variable being null. Is there an explanation regarding this? Seems Kotlin (1.6.21) is not null-safe in this situation.
class SomeClass { // extremely minified code
val foo = let { bar } // compile error (almost broke production but my unit test captured it)
// val foo = bar // compile error (safe!)
val bar = true
}ephemient
06/08/2022, 10:17 AMclass SomeClass {
val foo = bar()
val bar = true
private fun bar() = bar
and see an uninitialized variable there as wellephemient
06/08/2022, 10:20 AMallan.conda
06/08/2022, 11:25 AMKlitos Kyriacou
06/08/2022, 1:33 PMSomeClass().foo is initialized to false . I thought this discussion is saying it's uninitialized.allan.conda
06/08/2022, 2:36 PMList<T> type which is null if uninitialized.allan.conda
06/08/2022, 2:37 PM