Files
codeql/java/ql/test/kotlin/library-tests/dataflow/func/samConversion.kt
Tamas Vajk abcb367495 Add dataflow tests for lambda-like constructs
This commit adds tests for dataflow involving lambdas, big-arity lambdas, SAM conversions, and function references.
2022-05-10 19:51:25 +01:00

14 lines
267 B
Kotlin

fun interface Predicate {
fun go(s: String): String
}
class SamConversion {
fun test() {
val p1 = Predicate { Helper.taint() }
val p2 = Predicate { it -> it }
Helper.sink(p1.go(""))
Helper.sink(p1.go(Helper.taint()))
}
}