So I just discovered Kotlin's precondition functio...
# intellij
c
So I just discovered Kotlin's precondition functions and they're pretty neat. However one thing they don't do is play nicely with smart casts. Take for example:
Copy code
fun onAttach(view: View) {
  require(view is HomeView)
  // No smart cast from View to HomeView.
}
Is this something that should be supported? If so and a PR is welcome, where abouts in the source should I be looking for smart cast stuff?
k
not really #intellij related. besides, I think JB is working on a broader effects system that will enable your use case
s
Sounds very promising. Is there something for read about it?
k
s
Thank!