Skip to content

Commit ba74188

Browse files
committed
Merge pull request #294 from samuelgruetter/tests-rewrite-2
Run rewrite tool on tests (2)
2 parents 63e1bc9 + 42851ed commit ba74188

File tree

509 files changed

+125
-64
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

509 files changed

+125
-64
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

tests/untried/pos/exbound.scala renamed to tests/pending/pos/exbound.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ class A[T <: A[T]] {
33
}
44

55
object Test {
6-
val x: A[X] forSome { type X } = null
6+
val x: A[_] = null
77
}
File renamed without changes.
File renamed without changes.

tests/untried/pos/generic-sigs.scala renamed to tests/pending/pos/generic-sigs.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ object A {
1111
def f6(x: Int) = new Bippy[t forSome { type t <: Int }]
1212
def f7(x: T forSome { type T <: Float }) = x
1313
def f8(x: T forSome { type T <: Unit }) = x
14-
def f9(x: T forSome { type T <: runtime.BoxedUnit }) = x
14+
def f9(x: T forSome { type T <: scala.runtime.BoxedUnit }) = x
1515
def f10(x: Int) = new Bippy[t forSome { type t <: Unit }]
1616
def f11(x: Int) = new Bippy[t forSome { type t >: Null }]
1717

tests/untried/pos/hk-infer.scala renamed to tests/pending/pos/hk-infer.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ object ShouldWorkHK {
2020
def underlying = xs
2121
def BOOP(ys: Seq[M[_]]) = new Booper(xs ++ ys)
2222
}
23-
implicit def mkBoop[M[_]](xs: Seq[M[_]]) = new Booper(xs)
23+
implicit def mkBoop[M[_]](xs: Seq[M[_]]): ShouldWorkHK.Booper[M] = new Booper(xs)
2424

2525
def f1 = x BOOP y BOOP x1 BOOP x2
2626
}
@@ -30,7 +30,7 @@ object DoesWorkHK {
3030
def underlying = xs
3131
def BOOP(ys: Seq[M[_]]) = new Booper[M](xs ++ ys)
3232
}
33-
implicit def mkBoop[M[_]](xs: Seq[M[_]]) = new Booper[M](xs)
33+
implicit def mkBoop[M[_]](xs: Seq[M[_]]): DoesWorkHK.Booper[M] = new Booper[M](xs)
3434

3535
def f1 = x BOOP y BOOP x1 BOOP x2
3636
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

tests/untried/pos/overloaded_extractor_and_regular_def.scala renamed to tests/pending/pos/overloaded_extractor_and_regular_def.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ trait TreesBase {
1212
}
1313

1414
trait TreesApi extends TreesBase {
15-
def Apply(x: String)
15+
def Apply(x: String): Unit
1616
}
1717

1818
class Universe extends TreesApi {
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

tests/untried/pos/pos-bug1241.scala renamed to tests/pending/pos/pos-bug1241.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
object test extends App {
22
// more..
3-
type T = { def hello() }
3+
type T = { def hello(): Unit }
44
//val x4 = new AnyRef { def hello() { println("4") } } // ok!
55
val x4: T = new { def hello(): Unit = { println("4") } } // error!
66
x4.hello()

tests/untried/pos/presuperContext.scala renamed to tests/pending/pos/presuperContext.scala

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
class A {
2-
class C extends { val x: A = this } with AnyRef
2+
class C extends AnyRef {
3+
// TODO NEEDS MANUAL CHANGE (early initializers)
4+
// BEGIN copied early initializers
5+
val x: A = this
6+
// END copied early initializers
7+
}
38
}
49

510
class B(x: Int)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

tests/untried/pos/t3363-new.scala renamed to tests/pending/pos/t3363-new.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ object TestCase {
77

88
//if fs was reduced to List (generic type with one parameter) then the code compiles
99
//if you inherit from MapOps[T] instead of MapOps[F] then code compiles fine
10-
implicit def map2ops[T,F](fs: Map[T,F]) = new MapOps[F] {
10+
implicit def map2ops[T,F](fs: Map[T,F]): TestCase.MapOps[F]{lazy val m: reflect.runtime.universe.TypeTag[T]; def is(xs: List[T]): List[List[T]]} = new MapOps[F] {
1111
//if you remove this line, then code compiles
1212
lazy val m: TypeTag[T] = sys.error("just something to make it compile")
1313
def is(xs: List[T]) = List(xs)

tests/untried/pos/t3363-old.scala renamed to tests/pending/pos/t3363-old.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ object TestCase {
55

66
//if fs was reduced to List (generic type with one parameter) then the code compiles
77
//if you inherit from MapOps[T] instead of MapOps[F] then code compiles fine
8-
implicit def map2ops[T,F](fs: Map[T,F]) = new MapOps[F] {
8+
implicit def map2ops[T,F](fs: Map[T,F]): TestCase.MapOps[F]{lazy val m: Manifest[T]; def is(xs: List[T]): List[List[T]]} = new MapOps[F] {
99
//if you remove this line, then code compiles
1010
lazy val m: Manifest[T] = sys.error("just something to make it compile")
1111
def is(xs: List[T]) = List(xs)
File renamed without changes.
File renamed without changes.
File renamed without changes.

tests/pending/pos/t3480.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
object Test {
2+
val List(_*) = List(1)
3+
val Array( who, what : _* ) = "Eclipse plugin cannot not handle this" split (" ")
4+
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

tests/untried/pos/t3577.scala renamed to tests/pending/pos/t3577.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ case class C2(checks: Check[_]*);
44

55
object C {
66
def m(x : C2): Any = (null: Any) match {
7-
case C2(_, rest @ _*) => {
7+
case C2(_, rest : _*) => {
88
rest.map(_.value)
99
}
1010
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

tests/untried/pos/t3856.scala renamed to tests/pending/pos/t3856.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ case class CS(xs: C[_]*)
44

55
// t3856
66
object Test {
7-
val x = CS(C(5), C("abc")) match { case CS(C(5), xs @ _*) => xs }
7+
val x = CS(C(5), C("abc")) match { case CS(C(5), xs : _*) => xs }
88
println(x)
99
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

tests/pending/pos/t3986.scala

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
object Test {
2+
def main(args: Array[String]): Unit = {
3+
new AnyRef {
4+
// TODO NEEDS MANUAL CHANGE (early initializers)
5+
// BEGIN copied early initializers
6+
val x = "abc"
7+
// END copied early initializers
8+
}
9+
}
10+
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

tests/untried/pos/t4553.scala renamed to tests/pending/pos/t4553.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
trait VectorLike[+T, +V[A] <: Vector[A]] {
2-
def +[S, VResult[S] >: V[S]](v: VResult[S])
2+
def +[S, VResult[S] >: V[S]](v: VResult[S]): Unit
33
}
44

55
trait Vector[+T] extends VectorLike[T, Vector]
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

tests/untried/pos/t5330.scala renamed to tests/pending/pos/t5330.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
trait FM[A] {
2-
def map(f: A => Any)
2+
def map(f: A => Any): Unit
33
}
44

55
trait M[A] extends FM[A] {
6-
def map(f: A => Any)
6+
def map(f: A => Any): Unit
77
}
88

99
trait N[A] extends FM[A]
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)