mirror of
https://github.com/github/codeql.git
synced 2025-12-18 01:33:15 +01:00
10 lines
236 B
Kotlin
10 lines
236 B
Kotlin
class WithFlowTest {
|
|
fun <T> taint(t: T) = t
|
|
fun sink(s: String) { }
|
|
|
|
fun test(input: String) {
|
|
with(taint(input)) { sink(this) } // $ hasValueFlow
|
|
sink(with(taint(input)) { this }) // $ hasValueFlow
|
|
}
|
|
}
|