Files
kotlin-fork/compiler/testData/codegen/box/when/exhaustiveBoolean.kt
T

8 lines
260 B
Kotlin
Vendored

// LANGUAGE: -ProhibitSimplificationOfNonTrivialConstBooleanExpressions
// IGNORE_BACKEND_K2: JVM_IR, JS_IR, JS_IR_ES6, NATIVE, WASM
// FIR status: don't support legacy feature
fun box() : String = when (true) {
((true)) -> "OK"
(1 == 2) -> "Not ok"
}