Aladdin - Scala Bugtracking
[#752] project: compiler priority: low category: bug
submitter assigned to status date submitted
Nikolay Martin fixed 2006-09-24 16:14:50.0
subject [contrib #203] Wrong error message with mismatched function types
code
object Test
{
        def f(x : Int => Unit) : Unit = ()
        def g(x : String) : Unit = ()
        def main(argv : Array[String]) = {
                f(&g)
        }
}
what happened
/home/jwebb/tests/test.scala:6 error: missing arguments for method g in object Test;
prefix this method with `&' if you want to treat it as a partially applied function
                f(&g)
                   ^
one error found
what expected Error indicating that closure of g has the wrong type.
[back to overview]
Changes of this bug report
Nikolay  edited on  2006-09-24 16:15:55.0
Transferred from the contributions and asigned to Martin
Martin  edited on  2006-10-31 13:35:28.0