Files
kotlin-fork/js/js.translator/testData/box/expression/when/whenWithIf.kt
T
Alexey Andreev 3b3fd0fa0d JS: fix DCE limits in test data to fit new kotlin.js size
The size has increased due to new implementation of KClass
2017-10-06 18:16:51 +03:00

27 lines
417 B
Kotlin
Vendored

// EXPECTED_REACHABLE_NODES: 1108
package foo
fun box(): String {
var c = when(3) {
3 -> 1
2 -> 100
else -> 100
} + when (2) {
1 -> 100
else -> 1
} + when (0) {
1 -> if (true) 100 else 100
0 -> if (false) {
100
}
else {
1
}
else -> 100
}
if (c != 3) return "fail"
return "OK"
}