File tree Expand file tree Collapse file tree 3 files changed +4
-0
lines changed
kotlinx-coroutines-guava/src
kotlinx-coroutines-play-services/src
kotlinx-coroutines-core/common/test Expand file tree Collapse file tree 3 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -151,6 +151,7 @@ public fun <T> ListenableFuture<T>.asDeferred(): Deferred<T> {
151151 cancel(false )
152152 }
153153 // Return hides the CompletableDeferred. This should prevent casting.
154+ @OptIn(InternalForInheritanceCoroutinesApi ::class )
154155 return object : Deferred <T > by deferred {}
155156}
156157
Original file line number Diff line number Diff line change @@ -87,6 +87,7 @@ private fun <T> Task<T>.asDeferredImpl(cancellationTokenSource: CancellationToke
8787 }
8888 }
8989 // Prevent casting to CompletableDeferred and manual completion.
90+ @OptIn(InternalForInheritanceCoroutinesApi ::class )
9091 return object : Deferred <T > by deferred {}
9192}
9293
Original file line number Diff line number Diff line change @@ -353,6 +353,7 @@ class AwaitTest : TestBase() {
353353 fun testAwaitAllDelegates () = runTest {
354354 expect(1 )
355355 val deferred = CompletableDeferred <String >()
356+ @OptIn(InternalForInheritanceCoroutinesApi ::class )
356357 val delegate = object : Deferred <String > by deferred {}
357358 launch {
358359 expect(3 )
@@ -367,6 +368,7 @@ class AwaitTest : TestBase() {
367368 fun testCancelAwaitAllDelegate () = runTest {
368369 expect(1 )
369370 val deferred = CompletableDeferred <String >()
371+ @OptIn(InternalForInheritanceCoroutinesApi ::class )
370372 val delegate = object : Deferred <String > by deferred {}
371373 launch {
372374 expect(3 )
You can’t perform that action at this time.
0 commit comments