Files
kotlin/compiler/testData/codegen/bytecodeText/lazyCodegen/negateVarChain.kt
Mads Ager 57489febf0 JVM IR: simplify chains of negations in if conditions.
Introduce lowering phase that turns !!exp -> exp for the boolean
'not' builtin. This makes sure that code such as

```
if (!!!!!booleanValue) {
    doStuff()
}
```

generates only one branch.
2019-01-08 12:09:23 +01:00

9 lines
99 B
Kotlin
Vendored

val two = 2
fun test2() {
val p = 1 < two
if (!!!!!!p) {
val p = 1
}
}
// 2 IF