mirror of
https://github.com/github/codeql.git
synced 2025-12-20 10:46:30 +01:00
10 lines
237 B
Kotlin
10 lines
237 B
Kotlin
class ApplyFlowTest {
|
|
fun <T> taint(t: T) = t
|
|
fun sink(s: String) { }
|
|
|
|
fun test(input: String) {
|
|
taint(input).apply { sink(this) } // $ hasValueFlow
|
|
sink(taint(input).apply { this }) // $ hasValueFlow
|
|
}
|
|
}
|