Files
codeql/java/ql/test/kotlin/query-tests/UselessNullCheck/Test.kt
2022-05-10 19:51:28 +01:00

12 lines
210 B
Kotlin

fun fn(x:Any?, y: Any?) {
if (x == null && y == null) {
throw Exception()
}
if (x != null) {
println("x not null")
} else if (y != null) {
println("y not null")
}
}