File tree Expand file tree Collapse file tree 2 files changed +41
-0
lines changed
java/ql/test/kotlin/library-tests/dataflow/func Expand file tree Collapse file tree 2 files changed +41
-0
lines changed Original file line number Diff line number Diff line change 1+ import kotlinx.coroutines.*
2+
3+ suspend fun fn () {
4+ GlobalScope .launch {
5+ val x: Deferred <String > = async { Helper .taint() }
6+ Helper .sink(x.await()) // TODO: not found
7+ }
8+ }
Original file line number Diff line number Diff line change 1+ /* *
2+ * Stubs for `kotlinx.coroutines`
3+ */
4+
5+ @file:JvmName(" BuildersKt" ) // Required for `async`
6+
7+ package kotlinx.coroutines
8+
9+ public interface CoroutineScope
10+ public interface CoroutineContext
11+ public enum class CoroutineStart { DEFAULT }
12+ public interface Job
13+ public interface Deferred <out T > : Job {
14+ public suspend fun await (): T
15+ }
16+
17+ public object GlobalScope : CoroutineScope
18+
19+ public fun CoroutineScope.launch (
20+ context : CoroutineContext = null!!,
21+ start : CoroutineStart = CoroutineStart .DEFAULT ,
22+ block : suspend CoroutineScope .() -> Unit
23+ ): Job {
24+ return null !!
25+ }
26+
27+ public fun <T > CoroutineScope.async (
28+ context : CoroutineContext = null!!,
29+ start : CoroutineStart = CoroutineStart .DEFAULT ,
30+ block : suspend CoroutineScope .() -> T
31+ ): Deferred <T > {
32+ return null !!
33+ }
You can’t perform that action at this time.
0 commit comments