diff options
author | Paul Phillips <paulp@improving.org> | 2011-08-15 20:48:25 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-08-15 20:48:25 +0000 |
commit | 20859263f2a2cf85464b333b9842bb31c020ee5e (patch) | |
tree | 8a315ae89a7a3bf1093dd4c62dffa7c188c785fc /test/files/neg | |
parent | e43daf434becf4497acb4d297ab6d2866c16d1aa (diff) | |
download | scala-20859263f2a2cf85464b333b9842bb31c020ee5e.tar.gz scala-20859263f2a2cf85464b333b9842bb31c020ee5e.tar.bz2 scala-20859263f2a2cf85464b333b9842bb31c020ee5e.zip |
Removing the code which has been deprecated sin...
Removing the code which has been deprecated since 2.8.0. Contributed by
Simon Ochsenreither, although deleting code is such fun one hesitates to
call it a contribution. Still, we will. Closes SI-4860, no review.
Diffstat (limited to 'test/files/neg')
-rw-r--r-- | test/files/neg/bug1845.scala | 2 | ||||
-rw-r--r-- | test/files/neg/bug563.check | 2 | ||||
-rw-r--r-- | test/files/neg/bug563.scala | 4 | ||||
-rw-r--r-- | test/files/neg/migration28.check | 14 | ||||
-rw-r--r-- | test/files/neg/migration28.scala | 5 | ||||
-rw-r--r-- | test/files/neg/multi-array.check | 6 | ||||
-rw-r--r-- | test/files/neg/multi-array.scala | 13 | ||||
-rw-r--r-- | test/files/neg/t3115.check | 12 | ||||
-rw-r--r-- | test/files/neg/t3115.flags | 1 | ||||
-rwxr-xr-x | test/files/neg/t3115.scala | 9 | ||||
-rw-r--r-- | test/files/neg/t3773.check | 4 | ||||
-rw-r--r-- | test/files/neg/t3773.flags | 1 | ||||
-rw-r--r-- | test/files/neg/t3773.scala | 5 |
13 files changed, 22 insertions, 56 deletions
diff --git a/test/files/neg/bug1845.scala b/test/files/neg/bug1845.scala index ceb43a0552..dab448b7dd 100644 --- a/test/files/neg/bug1845.scala +++ b/test/files/neg/bug1845.scala @@ -1,6 +1,6 @@ import scala.util.parsing.combinator.syntactical.TokenParsers import scala.util.parsing.combinator.lexical.StdLexical -import scala.util.parsing.syntax.StdTokens +import scala.util.parsing.combinator.token._ class MyTokenParsers extends TokenParsers { import lexical._ diff --git a/test/files/neg/bug563.check b/test/files/neg/bug563.check index c10f504635..c592a56100 100644 --- a/test/files/neg/bug563.check +++ b/test/files/neg/bug563.check @@ -1,4 +1,4 @@ bug563.scala:6: error: missing parameter type - map(n,ptr => new Cell(ptr.elem)); + map(n,ptr => Option(ptr.get)); ^ one error found diff --git a/test/files/neg/bug563.scala b/test/files/neg/bug563.scala index 624b83b1fa..204ad3cbdd 100644 --- a/test/files/neg/bug563.scala +++ b/test/files/neg/bug563.scala @@ -1,7 +1,7 @@ object Test { def map[A,R](a : List[A], f : A => R) : List[R] = a.map(f); - def split(sn : Iterable[List[Cell[Int]]]) : Unit = + def split(sn : Iterable[List[Option[Int]]]) : Unit = for (n <- sn) - map(n,ptr => new Cell(ptr.elem)); + map(n,ptr => Option(ptr.get)); } diff --git a/test/files/neg/migration28.check b/test/files/neg/migration28.check index 4324cc0d0a..97146e88f7 100644 --- a/test/files/neg/migration28.check +++ b/test/files/neg/migration28.check @@ -1,8 +1,6 @@ -migration28.scala:5: error: method ++= in class Stack is deprecated: use pushAll - s ++= List(1,2,3) - ^ -migration28.scala:7: error: method foreach in class Stack has changed semantics: -Stack iterator and foreach now traverse in FIFO order. - s foreach (_ => ()) - ^ -two errors found +migration28.scala:4: error: method scanRight in trait TraversableLike has changed semantics: +This scanRight definition has changed in 2.9. +The previous behavior can be reproduced with scanRight.reverse. + List(1,2,3,4,5).scanRight(0)(_+_) + ^ +one error found diff --git a/test/files/neg/migration28.scala b/test/files/neg/migration28.scala index 090b32d690..facc9b36d2 100644 --- a/test/files/neg/migration28.scala +++ b/test/files/neg/migration28.scala @@ -1,10 +1,7 @@ object Test { import scala.collection.mutable._ - val s = new Stack[Int] - s ++= List(1,2,3) - s map (_ + 1) - s foreach (_ => ()) + List(1,2,3,4,5).scanRight(0)(_+_) def main(args: Array[String]): Unit = { diff --git a/test/files/neg/multi-array.check b/test/files/neg/multi-array.check index f8432a76b8..511caa126f 100644 --- a/test/files/neg/multi-array.check +++ b/test/files/neg/multi-array.check @@ -1,8 +1,4 @@ -multi-array.scala:6: warning: new Array(...) with multiple dimensions has been deprecated; use Array.ofDim(...) instead +multi-array.scala:7: error: too many arguments for constructor Array: (_length: Int)Array[T] val a: Array[Int] = new Array(10, 10) ^ -multi-array.scala:6: error: too many dimensions for array creation - val a: Array[Int] = new Array(10, 10) - ^ -one warning found one error found diff --git a/test/files/neg/multi-array.scala b/test/files/neg/multi-array.scala index 993a1c0865..b04e0fa0b1 100644 --- a/test/files/neg/multi-array.scala +++ b/test/files/neg/multi-array.scala @@ -1,7 +1,14 @@ -/** Check that a multi-dimensional array can't be created - * when the wrong number of arguments w.r.t. to the array's - * type is given. +/** Multi-dimensional array creation with `new` was removed in 2.10. + * The replacement Array.ofDim[Int](10,10) makes the original mistake + * which was tested here impossible. + * This test will fail now because the constructor doesn't exist anymore. */ class Foo { val a: Array[Int] = new Array(10, 10) } + +//Before removal of constructor non-unary Array constructors: +/** Check that a multi-dimensional array can't be created + * when the wrong number of arguments w.r.t. to the array's + * type is given. + */ diff --git a/test/files/neg/t3115.check b/test/files/neg/t3115.check deleted file mode 100644 index c128ff5f3f..0000000000 --- a/test/files/neg/t3115.check +++ /dev/null @@ -1,12 +0,0 @@ -t3115.scala:6: error: object Math in object sc is deprecated: - println(sc.Math) - ^ -t3115.scala:7: error: object Math is deprecated: use the scala.math package object instead. -(Example package object usage: scala.math.Pi ) - println(scala.Math) - ^ -t3115.scala:8: error: object Math is deprecated: use the scala.math package object instead. -(Example package object usage: scala.math.Pi ) - scala.Math.Pi - ^ -three errors found diff --git a/test/files/neg/t3115.flags b/test/files/neg/t3115.flags deleted file mode 100644 index d1b831ea87..0000000000 --- a/test/files/neg/t3115.flags +++ /dev/null @@ -1 +0,0 @@ --deprecation -Xfatal-warnings
\ No newline at end of file diff --git a/test/files/neg/t3115.scala b/test/files/neg/t3115.scala deleted file mode 100755 index 3888085593..0000000000 --- a/test/files/neg/t3115.scala +++ /dev/null @@ -1,9 +0,0 @@ -object sc { - @deprecated("", "2.8.0") object Math -} - -object Test { - println(sc.Math) - println(scala.Math) - scala.Math.Pi -} diff --git a/test/files/neg/t3773.check b/test/files/neg/t3773.check deleted file mode 100644 index ea0e866161..0000000000 --- a/test/files/neg/t3773.check +++ /dev/null @@ -1,4 +0,0 @@ -t3773.scala:3: error: method elements in trait IterableLike is deprecated: use `iterator` instead - for ((v, t) <- m.elements) () - ^ -one error found diff --git a/test/files/neg/t3773.flags b/test/files/neg/t3773.flags deleted file mode 100644 index d1b831ea87..0000000000 --- a/test/files/neg/t3773.flags +++ /dev/null @@ -1 +0,0 @@ --deprecation -Xfatal-warnings
\ No newline at end of file diff --git a/test/files/neg/t3773.scala b/test/files/neg/t3773.scala deleted file mode 100644 index 3b92ed2d23..0000000000 --- a/test/files/neg/t3773.scala +++ /dev/null @@ -1,5 +0,0 @@ -object t { - val m = Map(1 -> "one") - for ((v, t) <- m.elements) () -} - |