Well, I could certainly see something like this being added to the language :
val area = when (val shape = getShape()) {
is Circle -> Pi * shape.radius * shape.radius
is Rect -> shape.width * shape.height
}
as this was discussed at length in this thread and is proving popular with voters.