Skip to content

Instantly share code, notes, and snippets.

@TarodBOFH
Created November 11, 2018 21:45
Show Gist options
  • Save TarodBOFH/26339929378181883ffa7159e566d7c1 to your computer and use it in GitHub Desktop.
Save TarodBOFH/26339929378181883ffa7159e566d7c1 to your computer and use it in GitHub Desktop.
fun main() {
println(null != null ?: false)
val first = null // we don't know the type of this guy
val second = null ?: false // this guy is a boolean!
println(first != second)
var notNullableGuy = first != second // this guy is a non nullable boolean
notNullableGuy = false // we can do this
println(notNullableGuy)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment