orangy
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
}
}