Why does the type inferencer give up on this:
def test(a: Seq[Int], b: Seq[Int]) = (a, b).zipped.map((_ + _) / 2) // no
Like so:
<console>:35: error: missing parameter type for expanded function
((x$1, x$2) => x$1.$plus(x$2))
def test(a: Seq[Int], b: Seq[Int]) = (a, b).zipped.map((_ + _) / 2)
^
This is a strange subtlety which seems to have to do with the parentheses. For example, without using infix syntax it works:
def test(a: Seq[Int], b: Seq[Int]) = (a, b).zipped.map(_.+(_) / 2) // yes
If I add another pair of parentheses for the fun of it, it fails again:
def test(a: Seq[Int], b: Seq[Int]) = (a, b).zipped.map((_.+(_)) / 2) // no