From d3a71dbd88dd98006a893b35d52ad909c8cd10bb Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Fri, 8 Feb 2008 18:28:09 +0000 Subject: fixed missing deprecated warning on types; fixe... fixed missing deprecated warning on types; fixed problem with traits in refinements. --- test/files/pos/t0438.scala | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 test/files/pos/t0438.scala (limited to 'test/files/pos') 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 +} -- cgit v1.2.3