Skip to content

Commit

Permalink
Fix BlockingObservable.mostRecent type parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
zsxwing committed Aug 25, 2015
1 parent 3b8aeb3 commit bdae1eb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,9 @@ class BlockingObservable[+T] private[scala] (val o: Observable[T])
* the initial value that will be yielded by the `Iterable` sequence if the [[Observable]] has not yet emitted an item
* @return an `Iterable` that on each iteration returns the item that the [[Observable]] has most recently emitted
*/
def mostRecent[U >: T](initialValue: U): Iterable[U] = {
val asJavaU = asJava.asInstanceOf[rx.observables.BlockingObservable[U]]
asJavaU.mostRecent(initialValue).asScala: Iterable[U] // useless ascription because of compiler bug
def mostRecent[T](initialValue: T): Iterable[T] = {
val asJavaT = asJava.asInstanceOf[rx.observables.BlockingObservable[T]]
asJavaT.mostRecent(initialValue).asScala: Iterable[T] // useless ascription because of compiler bug
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ class BlockingObservableCompletenessKit extends CompletenessKit {
"last(Func1[_ >: T, Boolean])" -> "[use `Observable.filter(p).toBlocking.last`]",
"lastOrDefault(T)" -> "lastOrElse(=> U)",
"lastOrDefault(T, Func1[_ >: T, Boolean])" -> "[use `Observable.filter(p).toBlocking.lastOrElse(=> U)`]",
"mostRecent(T)" -> "mostRecent(U)",
"single(Func1[_ >: T, Boolean])" -> "[use `Observable.filter(p).toBlocking.single`]",
"singleOrDefault(T)" -> "singleOrElse(=> U)",
"singleOrDefault(T, Func1[_ >: T, Boolean])" -> "[use `Observable.filter(p).toBlocking.singleOrElse(=> U)`]",
Expand Down

0 comments on commit bdae1eb

Please sign in to comment.