Files
codeql/java/ql/test-kotlin2/query-tests/ConstantLoopCondition/A.kt
Owen Mansel-Chan a375e186ed Third pass
2026-06-11 21:53:22 +02:00

25 lines
375 B
Kotlin

fun fn0(f: Function0<Unit>) = f()
fun fn1() {
var c = true
while (c) { // $ SPURIOUS: Alert // TODO: false positive
fn0 {
c = false
}
}
var d = true
while (d) { // $ Alert
fn0 {
println(d)
}
}
val e = true
while (e) { // $ Alert
fn0 {
println(e)
}
}
}