r/mAndroidDev • • Mar 23 '26

Billion Dollar Mistake Null also Null

Kotlin is really a null-safety language. It allows you create a silent bug that should be avoided:

null.also {
    println("Hello production silent null bug")
}
0 Upvotes

21 comments sorted by

View all comments

Show parent comment

1

u/Opulence_Deficit You will pry XML views from my cold dead hands Mar 31 '26

The Kotlin code keeps running properly. I don't understand what's your problem with the code?