Skip to content

v1.6.0

Latest
Compare
Choose a tag to compare
@github-actions github-actions released this 17 Sep 04:21
· 4 commits to main since this release
080390c

ConsistentWhenEntries: Existing rule update.

Before, this was not allowed but is allowed now.

val a = listOf<Int>()
val b = when(a) {
    is ArrayList,
    is MutableList,
    -> true
    else -> false
}

Before, this was allowed but should not be allowed

val a = listOf<Int>()
val b = when(a) {
    is ArrayList,
    is MutableList,
    -> {
        true
    }
    else -> false
}