blob: 40eace848841d9c9a024e53c9c42114a4fff37d3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
// ERROR: A 'return' expression required in a function with a block body ('{...}')
// ERROR: 'when' expression must be exhaustive, add necessary 'C' branch or 'else' branch instead
// PROBLEM: none
enum class TestEnum{
A, B, C
}
fun test(e: TestEnum): Int {
<caret>when (e) {
TestEnum.A -> return 1
TestEnum.B -> return 2
}
}
|