File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed
language-adaptors/rxjava-scala/src/main/scala/rx/lang/scalaimpl Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -453,15 +453,9 @@ class Observable[+T](val asJava: rx.Observable[_ <: T])
453
453
* "count" produced values.
454
454
*/
455
455
def window (count : Int ): Observable [Observable [T ]] = {
456
- // this line makes the compiler crash (if it's the last line of the method):
457
- // Observable.jObsOfJObsToScObsOfScObs(asJava.window(count))
458
-
459
- // this line gives an error:
460
- // "type mismatch; found : rx.Observable[rx.Observable[_$1]] required: rx.Observable[rx.Observable[T]]"
461
- // Observable.jObsOfJObsToScObsOfScObs(asJava.window(count) : JObservable[JObservable[T]])
462
-
463
- // workaround with a cast:
464
- Observable .jObsOfJObsToScObsOfScObs(asJava.window(count).asInstanceOf [JObservable [JObservable [T ]]])
456
+ // this unnecessary ascription is needed because of this bug (without, compiler crashes):
457
+ // https://issues.scala-lang.org/browse/SI-7818
458
+ Observable .jObsOfJObsToScObsOfScObs(asJava.window(count)) : Observable [Observable [T ]]
465
459
}
466
460
467
461
/**
You can’t perform that action at this time.
0 commit comments