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 :
36
36
37
37
override fun <T > interceptContinuation (continuation : Continuation <T >): Continuation <T > =
38
38
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
39
46
}
40
47
41
48
internal class DispatchedContinuation <T >(
Original file line number Diff line number Diff line change @@ -68,6 +68,13 @@ public interface Job : CoroutineContext.Element {
68
68
*/
69
69
public fun cancel (reason : Throwable ? = null): Boolean
70
70
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
+
71
78
/* *
72
79
* Registration object for [onCompletion]. It can be used to [unregister] if needed.
73
80
* There is no need to unregister after completion.
You can’t perform that action at this time.
0 commit comments