Files
Mikhail Zarechenskiy 6bb2e4f62d [kotlin] Update test data after bundling new Kotlin JPS plug-in
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
2022-05-30 20:27:42 +00:00

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) {}