Files
kotlin-fork/idea/testData/intentions/branched/ifWhen/whenToIf/whenWithIf.kt.after
T
Mikhail Glukhikh 3fe114fc24 When to if now add braces for if branches inside #KT-12942 Fixed
(cherry picked from commit 29a7bfe)
2016-07-12 17:27:03 +03:00

10 lines
216 B
Plaintext
Vendored

// KT-12942: when to if changes semantics
fun test(b: Boolean): String {
if (b == true) {
if (true) return "first"
} else if (b == false) {
if (true) return "second"
}
return "none"
}