mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
The main issue here is that in tests we are using stdlib from the default JPS (KTIJ-21822) and a lot of tests infer language version based on a stdlib version. As a result, a lot of tests changed because of switching LV from 1.6 to 1.7. GitOrigin-RevId: 0eed6052bebcd53e2cb55daac7aad4a905bcc266
12 lines
395 B
Plaintext
12 lines
395 B
Plaintext
// ERROR: 'when' expression must be exhaustive, add necessary 'RW' branch or 'else' branch instead
|
|
// IS_APPLICABLE: true
|
|
enum class AccessMode { READ, WRITE, RW }
|
|
fun <T> run(f: () -> T) = f()
|
|
fun whenExpr(access: AccessMode) = run {
|
|
println("run")
|
|
when (access) {
|
|
AccessMode.READ -> println("read")
|
|
AccessMode.WRITE -> println("write")
|
|
}
|
|
}
|
|
fun println(s: String) {} |