File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
kotlinx-coroutines-core/src/main/kotlin/kotlinx/coroutines/experimental Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,13 @@ public abstract class CoroutineDispatcher :
3636
3737 override fun <T > interceptContinuation (continuation : Continuation <T >): Continuation <T > =
3838 DispatchedContinuation <T >(this , continuation)
39+
40+ @Suppress(" DeprecatedCallableAddReplaceWith" )
41+ @Deprecated(message = " Operator '+' on two CoroutineDispatcher objects is meaningless. " +
42+ " CoroutineDispatcher is a coroutine context element and `+` is a set-sum operator for coroutine contexts. " +
43+ " The dispatcher to the right of `+` just replaces the dispacher the left of `+`." ,
44+ level = DeprecationLevel .ERROR )
45+ public operator fun plus (other : CoroutineDispatcher ) = other
3946}
4047
4148internal class DispatchedContinuation <T >(
Original file line number Diff line number Diff line change @@ -68,6 +68,13 @@ public interface Job : CoroutineContext.Element {
6868 */
6969 public fun cancel (reason : Throwable ? = null): Boolean
7070
71+ @Suppress(" DeprecatedCallableAddReplaceWith" )
72+ @Deprecated(message = " Operator '+' on two Job objects is meaningless. " +
73+ " Job is a coroutine context element and `+` is a set-sum operator for coroutine contexts. " +
74+ " The job to the right of `+` just replaces the job the left of `+`." ,
75+ level = DeprecationLevel .ERROR )
76+ public operator fun plus (other : Job ) = other
77+
7178 /* *
7279 * Registration object for [onCompletion]. It can be used to [unregister] if needed.
7380 * There is no need to unregister after completion.
You can’t perform that action at this time.
0 commit comments