aboutsummaryrefslogtreecommitdiff
path: root/tests/untried
diff options
context:
space:
mode:
authorSamuel Gruetter <samuel.gruetter@epfl.ch>2014-03-19 17:07:46 +0100
committerSamuel Gruetter <samuel.gruetter@epfl.ch>2014-03-19 17:07:46 +0100
commit33b0e7b1ab0e71f525c75705dcd91b4b7d9d0994 (patch)
treed666ced3c08e0745bebb706148abbac56df78c8c /tests/untried
parent1dfe6567fee9626106211088e41c4683342ec0f8 (diff)
downloaddotty-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')
-rw-r--r--tests/untried/pos/SI-7638.scala2
-rw-r--r--tests/untried/pos/depmet_implicit_chaining_zw.scala4
-rw-r--r--tests/untried/pos/depmet_implicit_norm_ret.scala4
-rw-r--r--tests/untried/pos/depmet_implicit_oopsla_session.scala4
-rw-r--r--tests/untried/pos/depmet_implicit_oopsla_session_2.scala4
-rw-r--r--tests/untried/pos/depmet_implicit_oopsla_zipwith.scala4
-rw-r--r--tests/untried/pos/implicits-new.scala8
-rw-r--r--tests/untried/pos/implicits-old.scala8
-rw-r--r--tests/untried/pos/presuperContext.scala2
-rw-r--r--tests/untried/pos/t0438.scala2
-rw-r--r--tests/untried/pos/t0591.scala2
-rw-r--r--tests/untried/pos/t0786.scala4
-rw-r--r--tests/untried/pos/t0851.scala2
-rw-r--r--tests/untried/pos/t0872.scala2
-rw-r--r--tests/untried/pos/t1147.scala2
-rw-r--r--tests/untried/pos/t1832.scala2
-rwxr-xr-xtests/untried/pos/t2060.scala2
-rw-r--r--tests/untried/pos/t2421_delitedsl.scala2
-rw-r--r--tests/untried/pos/t2421b_pos.scala2
-rw-r--r--tests/untried/pos/t2421c.scala4
-rw-r--r--tests/untried/pos/t2782.scala4
-rwxr-xr-xtests/untried/pos/t2913.scala6
-rw-r--r--tests/untried/pos/t3177.scala2
-rw-r--r--tests/untried/pos/t3373.scala2
-rw-r--r--tests/untried/pos/t3808.scala2
-rw-r--r--tests/untried/pos/t3999/a_1.scala4
-rw-r--r--tests/untried/pos/t4273.scala4
-rw-r--r--tests/untried/pos/t4457_1.scala8
-rw-r--r--tests/untried/pos/t4975.scala2
-rw-r--r--tests/untried/pos/t5156.scala6
-rw-r--r--tests/untried/pos/t5892.scala2
-rw-r--r--tests/untried/pos/t6201.scala4
-rw-r--r--tests/untried/pos/t628.scala2
-rw-r--r--tests/untried/pos/t6556.scala2
-rw-r--r--tests/untried/pos/t7180.scala2
-rw-r--r--tests/untried/pos/t7486-named.scala2
-rw-r--r--tests/untried/pos/t7486.scala2
-rw-r--r--tests/untried/pos/t8219b.scala4
-rw-r--r--tests/untried/pos/tcpoly_infer_ticket1864.scala2
-rw-r--r--tests/untried/pos/ticket2201.scala2
40 files changed, 65 insertions, 65 deletions
diff --git a/tests/untried/pos/SI-7638.scala b/tests/untried/pos/SI-7638.scala
index 831475d00..ed581efe9 100644
--- a/tests/untried/pos/SI-7638.scala
+++ b/tests/untried/pos/SI-7638.scala
@@ -9,7 +9,7 @@ trait ArrayVectorOrder[@specialized(Int) A] extends Ordering[A] {
}
object vectorOrder {
- implicit def arrayOrder[@specialized(Int) A]() =
+ implicit def arrayOrder[@specialized(Int) A](): miniboxing.tests.compile.ArrayVectorOrder[A] =
/*
* Before applying patch:
*
diff --git a/tests/untried/pos/depmet_implicit_chaining_zw.scala b/tests/untried/pos/depmet_implicit_chaining_zw.scala
index ce5ea476d..a9da1e976 100644
--- a/tests/untried/pos/depmet_implicit_chaining_zw.scala
+++ b/tests/untried/pos/depmet_implicit_chaining_zw.scala
@@ -7,11 +7,11 @@ trait ZipWith[N, S] {
}
object ZipWith {
- implicit def ZeroZipWith[S] = new ZipWith[Zero, S] {
+ implicit def ZeroZipWith[S]: ZipWith[Zero,S]{type T = Stream[S]} = new ZipWith[Zero, S] {
type T = Stream[S]
}
- implicit def SuccZipWith[N, S, R](implicit zWith : ZipWith[N, R]) = new ZipWith[Succ[N], S => R] {
+ implicit def SuccZipWith[N, S, R](implicit zWith : ZipWith[N, R]): ZipWith[Succ[N],S => R]{type T = Stream[S] => zWith.T} = new ZipWith[Succ[N], S => R] {
type T = Stream[S] => zWith.T // dependent types replace the associated types functionality
}
diff --git a/tests/untried/pos/depmet_implicit_norm_ret.scala b/tests/untried/pos/depmet_implicit_norm_ret.scala
index 0c587cf16..85be750b4 100644
--- a/tests/untried/pos/depmet_implicit_norm_ret.scala
+++ b/tests/untried/pos/depmet_implicit_norm_ret.scala
@@ -3,7 +3,7 @@ object Test{
// fallback, lower priority (overloading rules apply: pick alternative in subclass lowest in subtyping lattice)
class ZipWithDefault {
- implicit def ZeroZipWith[S] = new ZipWith[S] {
+ implicit def ZeroZipWith[S]: Test.ZipWith[S]{type T = Stream[S]} = new ZipWith[S] {
type T = Stream[S]
}
}
@@ -12,7 +12,7 @@ object Test{
// def apply[S: ZipWith](s : S) = ?[ZipWith[S]].zipWith(s) // TODO: bug return type should be inferred
def apply[S](s : S)(implicit zw: ZipWith[S]): zw.T = zw.zipWith(s)
- implicit def SuccZipWith[S,R](implicit zWith : ZipWith[R]) = new ZipWith[S => R] {
+ implicit def SuccZipWith[S,R](implicit zWith : ZipWith[R]): Test.ZipWith[S => R]{type T = Stream[S] => zWith.T} = new ZipWith[S => R] {
type T = Stream[S] => zWith.T // dependent types replace the associated types functionality
}
}
diff --git a/tests/untried/pos/depmet_implicit_oopsla_session.scala b/tests/untried/pos/depmet_implicit_oopsla_session.scala
index 7e51861d6..aa8478056 100644
--- a/tests/untried/pos/depmet_implicit_oopsla_session.scala
+++ b/tests/untried/pos/depmet_implicit_oopsla_session.scala
@@ -11,7 +11,7 @@ object Sessions {
def run(p: Stop, dp: Stop): Unit = {}
}
- implicit def InDual[A, B](implicit sessionDIn: Session[B]) =
+ implicit def InDual[A, B](implicit sessionDIn: Session[B]): Sessions.Session[Sessions.In[A,B]]{type Dual = Sessions.Out[A,sessionDIn.Dual]} =
new Session[In[A, B]] {
type Dual = Out[A, sessionDIn.Dual]
@@ -19,7 +19,7 @@ object Sessions {
sessionDIn.run(p.func(dp.x), dp.y)
}
- implicit def OutDual[A, B](implicit sessionDOut: Session[B]) =
+ implicit def OutDual[A, B](implicit sessionDOut: Session[B]): Sessions.Session[Sessions.Out[A,B]]{type Dual = Sessions.In[A,sessionDOut.Dual]} =
new Session[Out[A, B]] {
type Dual = In[A, sessionDOut.Dual]
diff --git a/tests/untried/pos/depmet_implicit_oopsla_session_2.scala b/tests/untried/pos/depmet_implicit_oopsla_session_2.scala
index 598d3454c..4951c10a1 100644
--- a/tests/untried/pos/depmet_implicit_oopsla_session_2.scala
+++ b/tests/untried/pos/depmet_implicit_oopsla_session_2.scala
@@ -33,7 +33,7 @@ object Sessions {
// CD is the dual of Cont
// -------------------------------------------[InDual]
// Out[Data, CD] is the dual of In[Data, Cont]
- implicit def InDual[Data, Cont](implicit cont: Session[Cont]) = new Session[In[Data, Cont]] {
+ implicit def InDual[Data, Cont](implicit cont: Session[Cont]): Sessions.Session[Sessions.In[Data,Cont]]{type Dual = Sessions.Out[Data,cont.Dual]} = new Session[In[Data, Cont]] {
type Dual = Out[Data, cont.Dual]
def run(self: Self, dual: Dual): Unit =
@@ -43,7 +43,7 @@ object Sessions {
// CD is the dual of Cont
// -------------------------------------------[OutDual]
// In[Data, CD] is the dual of Out[Data, Cont]
- implicit def OutDual[Data, Cont](implicit cont: Session[Cont]) = new Session[Out[Data, Cont]] {
+ implicit def OutDual[Data, Cont](implicit cont: Session[Cont]): Sessions.Session[Sessions.Out[Data,Cont]]{type Dual = Sessions.In[Data,cont.Dual]} = new Session[Out[Data, Cont]] {
type Dual = In[Data, cont.Dual]
def run(self: Self, dual: Dual): Unit =
diff --git a/tests/untried/pos/depmet_implicit_oopsla_zipwith.scala b/tests/untried/pos/depmet_implicit_oopsla_zipwith.scala
index c034e3ef5..83171f865 100644
--- a/tests/untried/pos/depmet_implicit_oopsla_zipwith.scala
+++ b/tests/untried/pos/depmet_implicit_oopsla_zipwith.scala
@@ -9,13 +9,13 @@ trait ZipWith[N, S] {
def zipWith: N => S => T = n => f => manyApp(n)(continually(f))
}
object ZipWith {
- implicit def ZeroZipWith[S] = new ZipWith[Zero, S] {
+ implicit def ZeroZipWith[S]: ZipWith[Zero,S]{type T = Stream[S]} = new ZipWith[Zero, S] {
type T = Stream[S]
def manyApp = n => xs => xs
}
- implicit def SuccZipWith[N, S, R](implicit zw: ZipWith[N, R]) =
+ implicit def SuccZipWith[N, S, R](implicit zw: ZipWith[N, R]): ZipWith[Succ[N],S => R]{type T = Stream[S] => zw.T; def zapp[A, B](xs: Stream[A => B],ys: Stream[A]): Stream[B]} =
new ZipWith[Succ[N],S => R] {
type T = Stream[S] => zw.T
diff --git a/tests/untried/pos/implicits-new.scala b/tests/untried/pos/implicits-new.scala
index d5bf0ecfd..f6b69c707 100644
--- a/tests/untried/pos/implicits-new.scala
+++ b/tests/untried/pos/implicits-new.scala
@@ -32,8 +32,8 @@ object Test1579 {
class Query[E](val value: E)
class Invoker(q: Any) { val foo = null }
- implicit def unwrap[C](q: Query[C]) = q.value
- implicit def invoker(q: Query[Column]) = new Invoker(q)
+ implicit def unwrap[C](q: Query[C]): C = q.value
+ implicit def invoker(q: Query[Column]): Test1579.Invoker = new Invoker(q)
val q = new Query(new Column)
q.foo
@@ -45,9 +45,9 @@ object Test1625 {
def unwrap() = x
}
- implicit def byName[A](x: =>A) = new Wrapped(x)
+ implicit def byName[A](x: =>A): Test1625.Wrapped = new Wrapped(x)
- implicit def byVal[A](x: A) = x
+ implicit def byVal[A](x: A): A = x
def main(args: Array[String]) = {
diff --git a/tests/untried/pos/implicits-old.scala b/tests/untried/pos/implicits-old.scala
index b0e775086..96edd01f3 100644
--- a/tests/untried/pos/implicits-old.scala
+++ b/tests/untried/pos/implicits-old.scala
@@ -29,8 +29,8 @@ object Test1579 {
class Query[E](val value: E)
class Invoker(q: Any) { val foo = null }
- implicit def unwrap[C](q: Query[C]) = q.value
- implicit def invoker(q: Query[Column]) = new Invoker(q)
+ implicit def unwrap[C](q: Query[C]): C = q.value
+ implicit def invoker(q: Query[Column]): Test1579.Invoker = new Invoker(q)
val q = new Query(new Column)
q.foo
@@ -42,9 +42,9 @@ object Test1625 {
def unwrap() = x
}
- implicit def byName[A](x: =>A) = new Wrapped(x)
+ implicit def byName[A](x: =>A): Test1625.Wrapped = new Wrapped(x)
- implicit def byVal[A](x: A) = x
+ implicit def byVal[A](x: A): A = x
def main(args: Array[String]) = {
diff --git a/tests/untried/pos/presuperContext.scala b/tests/untried/pos/presuperContext.scala
index cc3426307..437765598 100644
--- a/tests/untried/pos/presuperContext.scala
+++ b/tests/untried/pos/presuperContext.scala
@@ -6,7 +6,7 @@ class B(x: Int)
class D {
class C(x: Int) extends B({val test: D = this; x}) {
- def this() {
+ def this() = {
this({val test: D = this; 1})
}
}
diff --git a/tests/untried/pos/t0438.scala b/tests/untried/pos/t0438.scala
index fa5b7711f..dd1e7f9a9 100644
--- a/tests/untried/pos/t0438.scala
+++ b/tests/untried/pos/t0438.scala
@@ -1,5 +1,5 @@
class Foo {
- implicit def pair2fun2[A, B, C](f: (A, B) => C) =
+ implicit def pair2fun2[A, B, C](f: (A, B) => C): ((A, B)) => C =
{p: (A, B) => f(p._1, p._2) }
def foo(f: ((Int, Int)) => Int) = f
diff --git a/tests/untried/pos/t0591.scala b/tests/untried/pos/t0591.scala
index 15f2dba08..6cb5e29b4 100644
--- a/tests/untried/pos/t0591.scala
+++ b/tests/untried/pos/t0591.scala
@@ -1,7 +1,7 @@
object Test {
def implicitly[T](implicit t : T) = t
implicit def perhaps[T](implicit t : T) : Option[T] = Some(t)
- implicit val hello = "Hello"
+ implicit val hello: String = "Hello"
implicitly[String]
implicitly[Option[String]]
}
diff --git a/tests/untried/pos/t0786.scala b/tests/untried/pos/t0786.scala
index 4cd09f4a1..b347b0bc5 100644
--- a/tests/untried/pos/t0786.scala
+++ b/tests/untried/pos/t0786.scala
@@ -7,11 +7,11 @@ object ImplicitProblem {
def eval: Int
}
- implicit def toRep0(n: Int) = new Rep[Int] {
+ implicit def toRep0(n: Int): ImplicitProblem.Rep[Int] = new Rep[Int] {
def eval = 0
}
- implicit def toRepN[T](n: M[T])(implicit f: T => Rep[T]) = new Rep[M[T]] {
+ implicit def toRepN[T](n: M[T])(implicit f: T => Rep[T]): ImplicitProblem.Rep[ImplicitProblem.M[T]] = new Rep[M[T]] {
def eval = f(nullval[T]).eval + 1
}
diff --git a/tests/untried/pos/t0851.scala b/tests/untried/pos/t0851.scala
index fc7109dcd..fcfdba51e 100644
--- a/tests/untried/pos/t0851.scala
+++ b/tests/untried/pos/t0851.scala
@@ -5,7 +5,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): test.test1.Foo[T,String] = Foo(f)
def main(args : Array[String]) : Unit = {
val f = (x:Int,s:String) => s + x
println(f(1))
diff --git a/tests/untried/pos/t0872.scala b/tests/untried/pos/t0872.scala
index 79df8e804..ccaee8052 100644
--- a/tests/untried/pos/t0872.scala
+++ b/tests/untried/pos/t0872.scala
@@ -1,7 +1,7 @@
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))
()
}
diff --git a/tests/untried/pos/t1147.scala b/tests/untried/pos/t1147.scala
index d4b3967dd..ff2e8bc52 100644
--- a/tests/untried/pos/t1147.scala
+++ b/tests/untried/pos/t1147.scala
@@ -1,5 +1,5 @@
class App(arg: String) {
- @deprecated("..") def this() {
+ @deprecated("..") def this() = {
this("foo")
}
}
diff --git a/tests/untried/pos/t1832.scala b/tests/untried/pos/t1832.scala
index 7e435d70b..3a5280640 100644
--- a/tests/untried/pos/t1832.scala
+++ b/tests/untried/pos/t1832.scala
@@ -2,7 +2,7 @@ trait Cloning {
trait Foo
def fn(g: Any => Unit): Foo
- implicit def mkStar(i: Int) = new { def *(a: Foo): Foo = null }
+ implicit def mkStar(i: Int): AnyRef{def *(a: Cloning.this.Foo): Cloning.this.Foo} = new { def *(a: Foo): Foo = null }
val pool = 4 * fn { case ghostSYMBOL: Int => ghostSYMBOL * 2 }
}
diff --git a/tests/untried/pos/t2060.scala b/tests/untried/pos/t2060.scala
index 2c701150e..0b9079062 100755
--- a/tests/untried/pos/t2060.scala
+++ b/tests/untried/pos/t2060.scala
@@ -24,7 +24,7 @@ object Test {
def plus [I](op : Op[I]): Op[I] = op;
}
- implicit def iToRich(x : Double) =
+ implicit def iToRich(x : Double): Test.Rich =
new Rich(x);
// fails to compile
diff --git a/tests/untried/pos/t2421_delitedsl.scala b/tests/untried/pos/t2421_delitedsl.scala
index da60c1ef3..2580592d9 100644
--- a/tests/untried/pos/t2421_delitedsl.scala
+++ b/tests/untried/pos/t2421_delitedsl.scala
@@ -8,7 +8,7 @@ trait DeliteDSL {
}
case class DeliteInt(x: Int) extends Forcible[Int]
- implicit val forcibleInt = Forcible.factory(DeliteInt(_: Int))
+ implicit val forcibleInt: DeliteDSL.this.<~<[Int,DeliteDSL.this.Forcible[Int]] = Forcible.factory(DeliteInt(_: Int))
import scala.collection.Traversable
class DeliteCollection[T](val xs: Traversable[T]) {
diff --git a/tests/untried/pos/t2421b_pos.scala b/tests/untried/pos/t2421b_pos.scala
index 0df346166..679b8a8d6 100644
--- a/tests/untried/pos/t2421b_pos.scala
+++ b/tests/untried/pos/t2421b_pos.scala
@@ -7,7 +7,7 @@ object Test {
def f(implicit aa: F[A]) = println(aa)
implicit def a : F[A] = new F[A]()
- implicit def b[X <: B] = new F[X]()
+ implicit def b[X <: B]: Test.F[X] = new F[X]()
f
}
diff --git a/tests/untried/pos/t2421c.scala b/tests/untried/pos/t2421c.scala
index d212fb903..bd24cacd7 100644
--- a/tests/untried/pos/t2421c.scala
+++ b/tests/untried/pos/t2421c.scala
@@ -10,8 +10,8 @@ object Test {
// generalised from t2421b to verify we check enough
class G[X]
- implicit def g[X] = new G[X]()
- implicit def b[X <: B](implicit mx: G[X]) = new F[X]()
+ implicit def g[X]: Test.G[X] = new G[X]()
+ implicit def b[X <: B](implicit mx: G[X]): Test.F[X] = new F[X]()
f
}
diff --git a/tests/untried/pos/t2782.scala b/tests/untried/pos/t2782.scala
index ab12aaf1f..3b387af80 100644
--- a/tests/untried/pos/t2782.scala
+++ b/tests/untried/pos/t2782.scala
@@ -4,9 +4,9 @@ object Test {
trait Foo[T]
// Haven't managed to repro without using a CanBuild or CanBuildFrom implicit parameter
- implicit def MapFoo[A, B, M[A, B] <: sc.Map[A,B]](implicit aFoo: Foo[A], bFoo: Foo[B], cb: sc.generic.CanBuild[(A, B), M[A, B]]) = new Foo[M[A,B]] {}
+ implicit def MapFoo[A, B, M[A, B] <: sc.Map[A,B]](implicit aFoo: Foo[A], bFoo: Foo[B], cb: sc.generic.CanBuild[(A, B), M[A, B]]): Test.Foo[M[A,B]] = new Foo[M[A,B]] {}
implicit object Tuple2IntIntFoo extends Foo[(Int, Int)] // no difference if this line is uncommented
- implicit def Tuple2Foo[A, B] = new Foo[(A, B)] {} // nor this one
+ implicit def Tuple2Foo[A, B]: Test.Foo[(A, B)] = new Foo[(A, B)] {} // nor this one
implicitly[Foo[(Int, Int)]]
}
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))
()
}
diff --git a/tests/untried/pos/t3177.scala b/tests/untried/pos/t3177.scala
index 9b850966d..12dfce6ee 100644
--- a/tests/untried/pos/t3177.scala
+++ b/tests/untried/pos/t3177.scala
@@ -5,7 +5,7 @@ trait InvariantFunctor[F[_]] {
object InvariantFunctor {
import Endo._
- implicit val EndoInvariantFunctor = new InvariantFunctor[Endo] {
+ implicit val EndoInvariantFunctor: InvariantFunctor[Endo] = new InvariantFunctor[Endo] {
def xmap[A, B](ma: Endo[A], f: A => B, g: B => A): Endo[B] = (b: B) => f(ma(g(b)))
}
diff --git a/tests/untried/pos/t3373.scala b/tests/untried/pos/t3373.scala
index 91768e201..b6594fb6c 100644
--- a/tests/untried/pos/t3373.scala
+++ b/tests/untried/pos/t3373.scala
@@ -5,7 +5,7 @@ class Entry(time: Long) {
object Test {
def extractTime(e: Entry) = e.getTime
- implicit val orderEntries = new Ordering[Entry] {
+ implicit val orderEntries: Ordering[Entry] = new Ordering[Entry] {
def compare(first: Entry, second: Entry) = extractTime(first) compare extractTime(second)
}
}
diff --git a/tests/untried/pos/t3808.scala b/tests/untried/pos/t3808.scala
index 8162fce72..ec95fed4d 100644
--- a/tests/untried/pos/t3808.scala
+++ b/tests/untried/pos/t3808.scala
@@ -1,7 +1,7 @@
object Test {
def meh: Unit = {
trait TC[I]
- implicit val tci = new TC[Int]{}
+ implicit val tci: TC[Int] = new TC[Int]{}
def baz[J : TC] : String = "meh"
diff --git a/tests/untried/pos/t3999/a_1.scala b/tests/untried/pos/t3999/a_1.scala
index 54c1b86ce..be9cc371e 100644
--- a/tests/untried/pos/t3999/a_1.scala
+++ b/tests/untried/pos/t3999/a_1.scala
@@ -4,6 +4,6 @@ class Outside
package object bar {
class Val(b: Boolean)
- implicit def boolean2Val(b: Boolean) = new Val(b)
- implicit def boolean2Outside(b: Boolean) = new Outside
+ implicit def boolean2Val(b: Boolean): foo.bar.package.Val = new Val(b)
+ implicit def boolean2Outside(b: Boolean): foo.Outside = new Outside
}
diff --git a/tests/untried/pos/t4273.scala b/tests/untried/pos/t4273.scala
index ed2c62770..8c4cbbbaf 100644
--- a/tests/untried/pos/t4273.scala
+++ b/tests/untried/pos/t4273.scala
@@ -1,8 +1,8 @@
class A {
- implicit def compareComparables[T](x: T)(implicit ord: Ordering[T]) = new ord.Ops(x)
+ implicit def compareComparables[T](x: T)(implicit ord: Ordering[T]): ord.Ops = new ord.Ops(x)
class Bippy
- implicit val bippyOrdering = new Ordering[Bippy] { def compare(x: Bippy, y: Bippy) = util.Random.nextInt }
+ implicit val bippyOrdering: Ordering[A.this.Bippy] = new Ordering[Bippy] { def compare(x: Bippy, y: Bippy) = util.Random.nextInt }
(new Bippy) < (new Bippy)
}
diff --git a/tests/untried/pos/t4457_1.scala b/tests/untried/pos/t4457_1.scala
index 7192d97f4..b2a4e301b 100644
--- a/tests/untried/pos/t4457_1.scala
+++ b/tests/untried/pos/t4457_1.scala
@@ -6,10 +6,10 @@ object ImplicitConvAmbiguity2 {
class AA[A]
class BB[A]
- implicit def conv1(i: Float) = new NE[Float]
- implicit def conv3(op: AA[java.util.TooManyListenersException]) = new N[java.util.TooManyListenersException]
- implicit def conv4(op: AA[Float]) = new N[Float]
- implicit def conv5(e: BB[java.util.GregorianCalendar]) = new N[java.util.GregorianCalendar]
+ implicit def conv1(i: Float): ImplicitConvAmbiguity2.NE[Float] = new NE[Float]
+ implicit def conv3(op: AA[java.util.TooManyListenersException]): ImplicitConvAmbiguity2.N[java.util.TooManyListenersException] = new N[java.util.TooManyListenersException]
+ implicit def conv4(op: AA[Float]): ImplicitConvAmbiguity2.N[Float] = new N[Float]
+ implicit def conv5(e: BB[java.util.GregorianCalendar]): ImplicitConvAmbiguity2.N[java.util.GregorianCalendar] = new N[java.util.GregorianCalendar]
def aFunc[A](a: NE[A]) = new AA[A]
def aFunc[A](a: NN[A]) = new BB[A]
diff --git a/tests/untried/pos/t4975.scala b/tests/untried/pos/t4975.scala
index 97ed9369e..3339631dc 100644
--- a/tests/untried/pos/t4975.scala
+++ b/tests/untried/pos/t4975.scala
@@ -4,7 +4,7 @@ object ImplicitScope {
def foo: Unit = {
trait B
object B {
- implicit def ab = new A[B]
+ implicit def ab: ImplicitScope.A[B] = new A[B]
}
implicitly[A[B]] // Error
diff --git a/tests/untried/pos/t5156.scala b/tests/untried/pos/t5156.scala
index 129e97a52..41b1c296e 100644
--- a/tests/untried/pos/t5156.scala
+++ b/tests/untried/pos/t5156.scala
@@ -6,14 +6,14 @@ object HList {
type ::[H, T <: HList] = HCons[H, T]
type HNil = HNil.type
- implicit def hlistOps[L <: HList](l : L) = new {
+ implicit def hlistOps[L <: HList](l : L): AnyRef{def ::[H](h: H): HList.::[H,L]; def last(implicit last: HList.Last[L]): Unit} = new {
def ::[H](h : H) : H :: L = HCons(h, l)
def last(implicit last : Last[L]): Unit = {}
}
class Last[L <: HList]
- implicit def hsingleLast[H] = new Last[H :: HNil]
- implicit def hlistLast[H, T <: HList](implicit lt : Last[T]) = new Last[H :: T]
+ implicit def hsingleLast[H]: HList.Last[HList.::[H,HList.HNil]] = new Last[H :: HNil]
+ implicit def hlistLast[H, T <: HList](implicit lt : Last[T]): HList.Last[HList.::[H,T]] = new Last[H :: T]
type III = Int :: Int :: Int :: HNil
val iii : III = 0 :: 0 :: 0 :: HNil
diff --git a/tests/untried/pos/t5892.scala b/tests/untried/pos/t5892.scala
index 26dd1f73d..ac383f8c1 100644
--- a/tests/untried/pos/t5892.scala
+++ b/tests/untried/pos/t5892.scala
@@ -1,5 +1,5 @@
class foo(a: String) extends annotation.StaticAnnotation
object o {
- implicit def i2s(i: Int) = ""
+ implicit def i2s(i: Int): String = ""
@foo(1: String) def blerg: Unit = { }
}
diff --git a/tests/untried/pos/t6201.scala b/tests/untried/pos/t6201.scala
index 9d6667b6f..900a267fb 100644
--- a/tests/untried/pos/t6201.scala
+++ b/tests/untried/pos/t6201.scala
@@ -12,8 +12,8 @@ class Test {
class Foo2 {
def must(x: Int) = ()
}
- implicit def toFoo1(s: Elem) = new Foo1()
- implicit def toFoo2(s: Elem) = new Foo2()
+ implicit def toFoo1(s: Elem): Test.this.Foo1 = new Foo1()
+ implicit def toFoo2(s: Elem): Test.this.Foo2 = new Foo2()
def is: Unit = { (elem) }
}
diff --git a/tests/untried/pos/t628.scala b/tests/untried/pos/t628.scala
index f32c1cad0..9a531a0cd 100644
--- a/tests/untried/pos/t628.scala
+++ b/tests/untried/pos/t628.scala
@@ -7,7 +7,7 @@ object Test {
def *(newUnit: Unit): Measure = Measure(scalar, newUnit)
}
- implicit def double2Measure(scalar: Double) =
+ implicit def double2Measure(scalar: Double): Test.Measure =
Measure(scalar, NoUnit)
diff --git a/tests/untried/pos/t6556.scala b/tests/untried/pos/t6556.scala
index e1a6f49b8..13560e8ba 100644
--- a/tests/untried/pos/t6556.scala
+++ b/tests/untried/pos/t6556.scala
@@ -7,7 +7,7 @@ trait Adapter[X] {self =>
}
object Adapter {
- implicit def adaptee[Adaptee](adapter: Adapter[Adaptee]) = adapter.adaptee
+ implicit def adaptee[Adaptee](adapter: Adapter[Adaptee]): Adaptee = adapter.adaptee
}
diff --git a/tests/untried/pos/t7180.scala b/tests/untried/pos/t7180.scala
index 15582f6df..e46d29f47 100644
--- a/tests/untried/pos/t7180.scala
+++ b/tests/untried/pos/t7180.scala
@@ -2,7 +2,7 @@ trait Higher[F[_]]
trait Box[A]
object Box {
- implicit def HigherBox = new Higher[Box] {}
+ implicit def HigherBox: Higher[Box] = new Higher[Box] {}
}
object Foo {
diff --git a/tests/untried/pos/t7486-named.scala b/tests/untried/pos/t7486-named.scala
index 253293e5f..05c1c0278 100644
--- a/tests/untried/pos/t7486-named.scala
+++ b/tests/untried/pos/t7486-named.scala
@@ -1,7 +1,7 @@
object Test {
def fold(empty: Any) = ()
- implicit val notAnnotatedImplicit = new {
+ implicit val notAnnotatedImplicit: AnyRef{def empty[A]: Any} = new {
fold(empty = 0)
def empty[A]: Any = ???
}
diff --git a/tests/untried/pos/t7486.scala b/tests/untried/pos/t7486.scala
index 6dd7f4c4a..6ad096c7c 100644
--- a/tests/untried/pos/t7486.scala
+++ b/tests/untried/pos/t7486.scala
@@ -1,7 +1,7 @@
object Test{
var locker = 0
// remove implicit, or change to `locker = locker + 1` to make it compile.
- implicit val davyJones0 = {
+ implicit val davyJones0: Int = {
locker += 0
0
}
diff --git a/tests/untried/pos/t8219b.scala b/tests/untried/pos/t8219b.scala
index d55d3139e..b820447ce 100644
--- a/tests/untried/pos/t8219b.scala
+++ b/tests/untried/pos/t8219b.scala
@@ -42,8 +42,8 @@ class Broken {
}
in {
import scala.None
- implicit def any2str1(a: Any) = ""
- implicit def any2str2(a: Any) = ""
+ implicit def any2str1(a: Any): String = ""
+ implicit def any2str2(a: Any): String = ""
T.foo("")
}
}
diff --git a/tests/untried/pos/tcpoly_infer_ticket1864.scala b/tests/untried/pos/tcpoly_infer_ticket1864.scala
index 70cfac062..4b7c7a223 100644
--- a/tests/untried/pos/tcpoly_infer_ticket1864.scala
+++ b/tests/untried/pos/tcpoly_infer_ticket1864.scala
@@ -36,7 +36,7 @@ object App {
implicit def richBuffer[T, B[U] <: Buffer[U]](buffer: B[T]): RichBuffer[T, B] =
new RichBuffer[T, B](buffer)
- implicit val rv = new ArrayBuffer[Int]
+ implicit val rv: scala.collection.mutable.ArrayBuffer[Int] = new ArrayBuffer[Int]
val buf = new ArrayBuffer[Int]
(1 to 5).foreach(buf += _)
buf.mymap(x => x*x)
diff --git a/tests/untried/pos/ticket2201.scala b/tests/untried/pos/ticket2201.scala
index 21af170cf..96b7b4a3d 100644
--- a/tests/untried/pos/ticket2201.scala
+++ b/tests/untried/pos/ticket2201.scala
@@ -1,5 +1,5 @@
class Test
-object Test { implicit def view(x : Test) = 0 }
+object Test { implicit def view(x : Test): Int = 0 }
object Call {
def call(implicit view : Test => Int) = view(null)