Files
kotlin-fork/idea/testData/inspections/nullableBooleanElvis/test.kt
T
Mikhail Glukhikh ef3ba5f0b1 Test local inspections on the fly via highlighting
Fixes problem with INFORMATION highlight type in batch mode (IDEA 181).
It's no more required to report INFORMATIONs in unit tests in batch.
2018-04-18 16:14:43 +03:00

15 lines
305 B
Kotlin
Vendored

fun foo() {
var a: Boolean? = null
var b: Boolean? = null
if (a ?: false) {
}
if (!(a ?: false)) {
}
if (a ?: false || !(b ?: true)) {
}
val x = a ?: false // INFORMATION -- not reported in batch
val y = !(b ?: true) // INFORMATION -- not reported in batch
}