Skip to content

Instantly share code, notes, and snippets.

@mirokolodii
Last active October 18, 2019 07:16
Show Gist options
  • Save mirokolodii/ba509654fe28998cd68be097a642a29e to your computer and use it in GitHub Desktop.
Save mirokolodii/ba509654fe28998cd68be097a642a29e to your computer and use it in GitHub Desktop.
Switch to Kotlin #2.4
Class Test(val someInt: Int)
val test1: Test // warning: no default value, should be initialized
// with non-null value before first use
val test2: Test = null // error: non-nullable type can't hold null value
val test3: Test? = null // valid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment