https://kotlinlang.org logo
n

nikolaymetchev

09/10/2017, 9:49 AM
I am thinking of asking for feature request - smart cast after a requireNonNull invocation. Any thoughts?
Copy code
fun m(s: String?) {
  requireNonNull(s,{"s shouldn't be null"})
  s.length //s cannot be null here! Would a smart cast be a good idea here?
}