Fall through in when

Urgh, I hope this syntax (the one from @Fele) does not get added.
That makes code really unreadable and error prone.
Especially when you can simply do

fun fillRating(stars: Array<View>, rating: Int) {
    (0..rating).forEach { stars[it].visibility = View.VISIBLE }
}

or

fun fillRating(stars: Array<View>, rating: Int) {
    (0..rating)
            .map { stars[it] }
            .forEach { it.visibility = View.VISIBLE }
}
1 Like