//// // Output of running: // $ scala -Xprint:parser -e "val e: Either[String, Int] = Right(1); for {i <- e.right; j = i + 1} yield j" //// // // Picked up _JAVA_OPTIONS: -Xss3m -XX:MaxPermSize=256M // /tmp/scalacmd2064075741948415763.scala:1: error: value map is not a member // of Product with Either[String,(Int, Int)] with Serializable // val e: Either[String, Int] = Right(1); for {i <- e.right; j = i + 1} yield j // ^ // one error found // [[syntax trees at end of parser]]// Scala source: scalacmd2064075741948415763.scala package { object Main extends scala.ScalaObject { def () = { super.(); () }; def main(argv: Array[String]): scala.Unit = { val args = argv; { final class $anon extends scala.AnyRef { def () = { super.(); () }; val e: Either[String, Int] = Right(1); e.right.map(((i) => { val j = i.$plus(1); scala.Tuple2(i, j) })).map(((x$1) => x$1: @scala.unchecked match { case scala.Tuple2((i @ _), (j @ _)) => j })) }; new $anon() } } } }