summaryrefslogtreecommitdiff
path: root/plugins/kotlin/idea/tests/testData/intentions/addWhenRemainingBranches/emptyWhen.kt.after
blob: d6e3980373c74b63233afff06dc98bd8e990fe3d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// WITH_RUNTIME
// ERROR: 'when' expression must be exhaustive, add necessary 'FOO', 'BAR', 'BAZ' branches or 'else' branch instead
// SKIP_ERRORS_AFTER

enum class Entry {
    FOO, BAR, BAZ
}

fun test(e: Entry) {
    when (e) {
        <caret>Entry.FOO -> TODO()
        Entry.BAR -> TODO()
        Entry.BAZ -> TODO()
    }
}