mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-10 15:53:46 +00:00
Specifically, defer the removal of hand-written "if (true|false)" from JvmBuiltinOptimizationLowering into codegen so that appropriate debug info (and a NOP) can be inserted. Change-Id: Ia11af05ad8b4251946bd3e685fb7c3319f0f433f
36 lines
448 B
Kotlin
Vendored
36 lines
448 B
Kotlin
Vendored
fun cond() = false
|
|
|
|
fun bar() {}
|
|
|
|
fun foo() {
|
|
if (cond()) {
|
|
bar()
|
|
} else if (true) {
|
|
bar()
|
|
} else {
|
|
bar()
|
|
}
|
|
|
|
if (false) {
|
|
bar()
|
|
} else if (true) {
|
|
bar()
|
|
} else {
|
|
bar()
|
|
}
|
|
|
|
if (true) {
|
|
bar()
|
|
} else if (false) {
|
|
bar()
|
|
} else {
|
|
bar()
|
|
}
|
|
}
|
|
|
|
// 1 LINENUMBER 6
|
|
// 1 LINENUMBER 8
|
|
// 1 LINENUMBER 14
|
|
// 1 LINENUMBER 16
|
|
// 1 LINENUMBER 22
|