else
when
「式の単純化」クイックフィックスを使用すると、コードを自動的に修正できます。
例:
fun redundant() { val x = when { // <== 冗長。クイックフィックスで when 式を "val x = 1" に単純化できます else -> 1 } }