summaryrefslogtreecommitdiff
path: root/test/files
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2008-02-08 18:28:09 +0000
committerMartin Odersky <odersky@gmail.com>2008-02-08 18:28:09 +0000
commitd3a71dbd88dd98006a893b35d52ad909c8cd10bb (patch)
tree6d5f7ceec3d52caf80789ad8d61f51ae2f006537 /test/files
parenta176556bea2482d4c3c86a3604ec1eaa16d0daf1 (diff)
downloadscala-d3a71dbd88dd98006a893b35d52ad909c8cd10bb.tar.gz
scala-d3a71dbd88dd98006a893b35d52ad909c8cd10bb.tar.bz2
scala-d3a71dbd88dd98006a893b35d52ad909c8cd10bb.zip
fixed missing deprecated warning on types; fixe...
fixed missing deprecated warning on types; fixed problem with traits in refinements.
Diffstat (limited to 'test/files')
-rw-r--r--test/files/pos/t0438.scala12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/files/pos/t0438.scala b/test/files/pos/t0438.scala
new file mode 100644
index 0000000000..fa5b7711ff
--- /dev/null
+++ b/test/files/pos/t0438.scala
@@ -0,0 +1,12 @@
+class Foo {
+ implicit def pair2fun2[A, B, C](f: (A, B) => C) =
+ {p: (A, B) => f(p._1, p._2) }
+
+ def foo(f: ((Int, Int)) => Int) = f
+ def bar(x: Int, y: Int) = x + y
+
+ foo({ (x: Int, y: Int) => x + y }) // works
+ foo(pair2fun2(bar _)) // works
+ foo(bar _) // error
+ foo(bar) // same error
+}