My idea looks crazy. Kotlin has eliminated NPEs at...
# language-proposals
m
My idea looks crazy. Kotlin has eliminated NPEs at compile-time, but some other checks involving heavy static analysis can be added to move some runtime exceptions into compile-time.
val name: String if { !it.isEmpty() }
or
fun fact(n: Int if { it in 0..20 }): Long