LukaJCB / rxscala-js

Scala idiomatic wrapper for RxJS
http://lukajcb.github.io/rxscala-js/latest/api/rxscalajs/Observable.html
47 stars 7 forks source link

Overloaded .map inference problem #6

Closed KadekM closed 7 years ago

KadekM commented 7 years ago

Currently inference fails on this (scala 2.11):

 observable.map {
      case ...=> ...
      case..  => ...
    }
missing parameter type for expanded function
[error] The argument types of an anonymous function must be fully known. (SLS 8.5)
[error] Expected type was: ?
[error]     observable.map {

Could we prehaps rename

  def map[R](project: (T, Int) => R): Observable[R] = {

to something else ? Like mapWithIndex

That would fix the inference problem.

LukaJCB commented 7 years ago

Fixed with commit https://github.com/LukaJCB/rxscala-js/commit/9ea96a910c0b78a2333a621c3c79fcb068b34434