Wrong instrumentation for HOF using infix notation #107

Open
dotta opened this Issue Oct 28, 2012 · 1 comment

Comments

Projects
None yet
2 participants
Owner

dotta commented Oct 28, 2012

object error {
  List(0) map { el =>
    List(el)
  }
}

The above worksheet fails compiling, and the error recursive value res$0 needs type is reported.

The workaround is to not use the infix notation, i.e., the following works just fine:

object error {
  List(0).map { el =>
    List(el)
  }                                               //> res0: List[List[Int]] = List(List(0))
}

dipakc commented Nov 9, 2012

Getting the same error for the following expression. What would be the workaround in this case? (other than using map )

for( x <- Range(1, 5) ) yield {
  x
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment