diff options
author | Paul Phillips <paulp@improving.org> | 2009-02-18 18:01:08 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2009-02-18 18:01:08 +0000 |
commit | 0e04072c89052a6fc296b77df64f6501c36d0c92 (patch) | |
tree | d05962e3e43de48ba347f4362c8fae38351607df /test/files/pos | |
parent | 882022241d42d284e0bb2aa47cf1742107c9c2d3 (diff) | |
download | scala-0e04072c89052a6fc296b77df64f6501c36d0c92.tar.gz scala-0e04072c89052a6fc296b77df64f6501c36d0c92.tar.bz2 scala-0e04072c89052a6fc296b77df64f6501c36d0c92.zip |
Fix for #460 (and its duplicate #1413) plus tes...
Fix for #460 (and its duplicate #1413) plus test case. Method f can now
be invoked via (f _)(x) without requiring .apply(x).
Diffstat (limited to 'test/files/pos')
-rw-r--r-- | test/files/pos/bug460.scala | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/files/pos/bug460.scala b/test/files/pos/bug460.scala new file mode 100644 index 0000000000..7bf9374e91 --- /dev/null +++ b/test/files/pos/bug460.scala @@ -0,0 +1,9 @@ +object Bug460 { + def testFun(x : Int, y : Int) = x + y + val fn = testFun _ + + fn(1, 2) // Ok + (testFun(_, _))(1, 2) // Ok + (testFun _).apply(1, 2) + (testFun _)(1, 2) // Error! (but no longer) +}
\ No newline at end of file |