A quite complicated case where smart-cast should t...
# language-proposals
m
A quite complicated case where smart-cast should take place, but it does not:
Copy code
val url = when (whatever?.type) {
    Whatever.Type.PHOTO -> whatever!!.getAsPhoto().urls
    Whatever.Type.ALBUM -> whatever!!.getAsAlbum().cover.urls
    else -> { //                   ^ here
        supportFinishAfterTransition()
        return
    }
}.getUrl()