diff options
author | Samuel Gruetter <samuel.gruetter@epfl.ch> | 2014-03-19 17:07:46 +0100 |
---|---|---|
committer | Samuel Gruetter <samuel.gruetter@epfl.ch> | 2014-03-19 17:07:46 +0100 |
commit | 33b0e7b1ab0e71f525c75705dcd91b4b7d9d0994 (patch) | |
tree | d666ced3c08e0745bebb706148abbac56df78c8c /tests/untried/pos/t2913.scala | |
parent | 1dfe6567fee9626106211088e41c4683342ec0f8 (diff) | |
download | dotty-33b0e7b1ab0e71f525c75705dcd91b4b7d9d0994.tar.gz dotty-33b0e7b1ab0e71f525c75705dcd91b4b7d9d0994.tar.bz2 dotty-33b0e7b1ab0e71f525c75705dcd91b4b7d9d0994.zip |
apply srewrite (explicit types for implicits + no procedure syntax
for constructors) to tests/untried/pos
Diffstat (limited to 'tests/untried/pos/t2913.scala')
-rwxr-xr-x | tests/untried/pos/t2913.scala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/untried/pos/t2913.scala b/tests/untried/pos/t2913.scala index 6366548c6..55b72bed4 100755 --- a/tests/untried/pos/t2913.scala +++ b/tests/untried/pos/t2913.scala @@ -10,7 +10,7 @@ class RichA { object Test { - implicit def AToRichA(a: A) = new RichA + implicit def AToRichA(a: A): RichA = new RichA val a = new A a.foo() @@ -36,7 +36,7 @@ object test1 { def apply(t : T) = (s:T2) => f(t,s) def apply(p : (T,T2)) = f(p._1,p._2) } - implicit def g[T](f : (T,String) => String) = Foo(f) + implicit def g[T](f : (T,String) => String): test1.Foo[T,String] = Foo(f) def main(args : Array[String]) : Unit = { val f = (x:Int,s:String) => s + x println(f(1)) @@ -46,7 +46,7 @@ object test1 { object Main { def main(args : Array[String]): Unit = { val fn = (a : Int, str : String) => "a: " + a + ", str: " + str - implicit def fx[T](f : (T,String) => String) = (x:T) => f(x,null) + implicit def fx[T](f : (T,String) => String): T => String = (x:T) => f(x,null) println(fn(1)) () } |