https://kotlinlang.org logo
g

groostav

06/18/2017, 11:50 PM
hey, does anybody know why
requireNotNull
doesn't perform a smart-cast on its value? its inlined functions all the way down, so
Copy code
fun things(val x: Param?){
  requireNotNull(x)
}
is transformed into
Copy code
fun things(val x: Param?){
  if(x == null) {
    //...
    throw IllegalArgumentException() 
  } 
}