I tried it with enums, and it still works (in 1.1)...
# language-proposals
o
I tried it with enums, and it still works (in 1.1)
Copy code
fun x(whatever: Whatever?) {
    val url = when (whatever?.type) {
        Whatever.Type.PHOTO -> whatever.hashCode()
        Whatever.Type.ALBUM -> whatever.hashCode()
        else -> { //                   ^ here
            return
        }
    }
}

class Whatever {
    val type: Any = Type.PHOTO
    enum class Type {
        PHOTO,
        ALBUM
    }
}