Extraction discrepancy fixed in kotlinc 1.7.21

This commit is contained in:
Tony Torralba
2022-12-07 09:57:31 +01:00
parent 47d61e0b4d
commit 85b2642a5e

View File

@@ -20,10 +20,8 @@ class TestKt {
fun exactPathMatchGuard() {
run {
val source = source() as String?
// This gets extracted as Object.equals, which makes the definitions in exactPathMatchGuard not catch it.
// Note that it gets correctly extracted in Java.
if (source!!.equals("/safe/path"))
sink(source) // $SPURIOUS: $ hasTaintFlow
sink(source) // Safe
else
sink(source) // $ hasTaintFlow
}