| [#901] | project: compiler | priority: medium | category: bug | |
|---|---|---|---|---|
| submitter | assigned to | status | date submitted | |
| Iulian | Martin | fixed | 2007-01-18 15:07:18.0 | |
| subject | views don't work on function types | |||
| code |
class Foo {
implicit def pair2fun2[A, B, C](f: (A, B) => C) =
{p: Pair[A, B] => f(p._1, p._2) }
val x: Pair[Int, Int] => Int = { (x: Int, y: Int) => x + y }
}
|
|||
| what happened | views.scala:5: error: wrong number of parameters; expected = 1
val x: Pair[Int, Int] => Int = { (x: Int, y: Int) => x + y }
^
one error found
|
|||
| what expected | No error. It works if I explicitly pass the closure to pair2fun2. | |||
| [back to overview] | ||||
| Iulian edited on 2007-01-18 15:07:49.0 |
| Martin edited on 2007-03-06 01:10:06.0 |