File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed
reactive/kotlinx-coroutines-rx2/src Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ public fun <T> Deferred<T?>.asMaybe(context: CoroutineContext): Maybe<T> = Globa
56
56
* @param context -- the coroutine context from which the resulting single is going to be signalled
57
57
*/
58
58
@ExperimentalCoroutinesApi
59
- public fun <T > Deferred<T>.asSingle (context : CoroutineContext ): Single <T > = GlobalScope .rxSingle(context) {
59
+ public fun <T : Any > Deferred<T>.asSingle (context : CoroutineContext ): Single <T > = GlobalScope .rxSingle(context) {
60
60
this @asSingle.await()
61
61
}
62
62
@@ -72,7 +72,7 @@ public fun <T> Deferred<T>.asSingle(context: CoroutineContext): Single<T> = Glob
72
72
* @param context -- the coroutine context from which the resulting observable is going to be signalled
73
73
*/
74
74
@ObsoleteCoroutinesApi
75
- public fun <T > ReceiveChannel<T>.asObservable (context : CoroutineContext ): Observable <T > = GlobalScope .rxObservable(context) {
75
+ public fun <T : Any > ReceiveChannel<T>.asObservable (context : CoroutineContext ): Observable <T > = GlobalScope .rxObservable(context) {
76
76
for (t in this @asObservable)
77
77
send(t)
78
78
}
Original file line number Diff line number Diff line change @@ -34,12 +34,12 @@ import kotlin.coroutines.experimental.*
34
34
*
35
35
* **Note: This is an experimental api.** Behaviour of publishers that work as children in a parent scope with respect
36
36
* to cancellation and error handling may change in the future.
37
- *
37
+ *
38
38
* @param context context of the coroutine.
39
39
* @param block the coroutine code.
40
40
*/
41
41
@ExperimentalCoroutinesApi
42
- public fun <T > CoroutineScope.rxObservable (
42
+ public fun <T : Any > CoroutineScope.rxObservable (
43
43
context : CoroutineContext = EmptyCoroutineContext ,
44
44
block : suspend ProducerScope <T >.() -> Unit
45
45
): Observable <T > = Observable .create { subscriber ->
@@ -58,7 +58,7 @@ public fun <T> CoroutineScope.rxObservable(
58
58
replaceWith = ReplaceWith (" GlobalScope.rxObservable(context, block)" ,
59
59
imports = [" kotlinx.coroutines.experimental.GlobalScope" , " kotlinx.coroutines.experimental.rx2.rxObservable" ])
60
60
)
61
- public fun <T > rxObservable (
61
+ public fun <T : Any > rxObservable (
62
62
context : CoroutineContext = Dispatchers .Default ,
63
63
parent : Job ? = null,
64
64
block : suspend ProducerScope <T >.() -> Unit
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ import kotlin.coroutines.experimental.*
27
27
* @param context context of the coroutine.
28
28
* @param block the coroutine code.
29
29
*/
30
- public fun <T > CoroutineScope.rxSingle (
30
+ public fun <T : Any > CoroutineScope.rxSingle (
31
31
context : CoroutineContext = EmptyCoroutineContext ,
32
32
block : suspend CoroutineScope .() -> T
33
33
): Single <T > = Single .create { subscriber ->
@@ -46,7 +46,7 @@ public fun <T> CoroutineScope.rxSingle(
46
46
replaceWith = ReplaceWith (" GlobalScope.rxSingle(context, block)" ,
47
47
imports = [" kotlinx.coroutines.experimental.GlobalScope" , " kotlinx.coroutines.experimental.rx2.rxSingle" ])
48
48
)
49
- public fun <T > rxSingle (
49
+ public fun <T : Any > rxSingle (
50
50
context : CoroutineContext = Dispatchers .Default ,
51
51
parent : Job ? = null,
52
52
block : suspend CoroutineScope .() -> T
You can’t perform that action at this time.
0 commit comments