summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJosh Suereth <Joshua.Suereth@gmail.com>2012-10-05 09:45:26 -0700
committerJosh Suereth <Joshua.Suereth@gmail.com>2012-10-05 09:45:26 -0700
commitbfde8c79cf68541e29e60d22371bcc4669be7b83 (patch)
treedce26aa1490c1f25db0806d03f40638a45211740 /test
parent3c7f269c30fd14fa7f125d09061fa2a9fb28df05 (diff)
parent1acb1664f3c5203968ed989fc8531dbc8e534e05 (diff)
downloadscala-bfde8c79cf68541e29e60d22371bcc4669be7b83.tar.gz
scala-bfde8c79cf68541e29e60d22371bcc4669be7b83.tar.bz2
scala-bfde8c79cf68541e29e60d22371bcc4669be7b83.zip
Merge pull request #1455 from scalamacros/topic/manifests
undeprecates manifests for 2.10.0
Diffstat (limited to 'test')
-rw-r--r--test/files/neg/classmanifests_new_deprecations.check32
-rw-r--r--test/files/neg/t3692-old.check8
-rw-r--r--test/files/run/manifests-undeprecated-in-2.10.0.flags1
-rw-r--r--test/files/run/manifests-undeprecated-in-2.10.0.scala15
4 files changed, 18 insertions, 38 deletions
diff --git a/test/files/neg/classmanifests_new_deprecations.check b/test/files/neg/classmanifests_new_deprecations.check
index e10308a66f..12428c7626 100644
--- a/test/files/neg/classmanifests_new_deprecations.check
+++ b/test/files/neg/classmanifests_new_deprecations.check
@@ -28,34 +28,4 @@ classmanifests_new_deprecations.scala:10: error: type ClassManifest in object Pr
classmanifests_new_deprecations.scala:15: error: type ClassManifest in package reflect is deprecated: Use scala.reflect.ClassTag instead
type RCM[T] = scala.reflect.ClassManifest[T]
^
-classmanifests_new_deprecations.scala:20: error: type Manifest in object Predef is deprecated: Use scala.reflect.ClassTag (to capture erasures) or scala.reflect.runtime.universe.TypeTag (to capture types) or both instead
- def m1[T: Manifest] = ???
- ^
-classmanifests_new_deprecations.scala:21: error: type Manifest in object Predef is deprecated: Use scala.reflect.ClassTag (to capture erasures) or scala.reflect.runtime.universe.TypeTag (to capture types) or both instead
- def m2[T](implicit evidence$1: Manifest[T]) = ???
- ^
-classmanifests_new_deprecations.scala:22: error: type Manifest in object Predef is deprecated: Use scala.reflect.ClassTag (to capture erasures) or scala.reflect.runtime.universe.TypeTag (to capture types) or both instead
- val m3: Manifest[Int] = null
- ^
-classmanifests_new_deprecations.scala:22: error: type Manifest in object Predef is deprecated: Use scala.reflect.ClassTag (to capture erasures) or scala.reflect.runtime.universe.TypeTag (to capture types) or both instead
- val m3: Manifest[Int] = null
- ^
-classmanifests_new_deprecations.scala:24: error: trait Manifest in package reflect is deprecated: Use scala.reflect.ClassTag (to capture erasures) or scala.reflect.runtime.universe.TypeTag (to capture types) or both instead
- def rm1[T: scala.reflect.Manifest] = ???
- ^
-classmanifests_new_deprecations.scala:25: error: trait Manifest in package reflect is deprecated: Use scala.reflect.ClassTag (to capture erasures) or scala.reflect.runtime.universe.TypeTag (to capture types) or both instead
- def rm2[T](implicit evidence$1: scala.reflect.Manifest[T]) = ???
- ^
-classmanifests_new_deprecations.scala:26: error: trait Manifest in package reflect is deprecated: Use scala.reflect.ClassTag (to capture erasures) or scala.reflect.runtime.universe.TypeTag (to capture types) or both instead
- val rm3: scala.reflect.Manifest[Int] = null
- ^
-classmanifests_new_deprecations.scala:26: error: trait Manifest in package reflect is deprecated: Use scala.reflect.ClassTag (to capture erasures) or scala.reflect.runtime.universe.TypeTag (to capture types) or both instead
- val rm3: scala.reflect.Manifest[Int] = null
- ^
-classmanifests_new_deprecations.scala:28: error: type Manifest in object Predef is deprecated: Use scala.reflect.ClassTag (to capture erasures) or scala.reflect.runtime.universe.TypeTag (to capture types) or both instead
- type M[T] = Manifest[T]
- ^
-classmanifests_new_deprecations.scala:33: error: trait Manifest in package reflect is deprecated: Use scala.reflect.ClassTag (to capture erasures) or scala.reflect.runtime.universe.TypeTag (to capture types) or both instead
- type RM[T] = scala.reflect.Manifest[T]
- ^
-20 errors found
+10 errors found
diff --git a/test/files/neg/t3692-old.check b/test/files/neg/t3692-old.check
index 950f82951c..9f3ae516aa 100644
--- a/test/files/neg/t3692-old.check
+++ b/test/files/neg/t3692-old.check
@@ -7,14 +7,8 @@ t3692-old.scala:14: warning: non-variable type argument Int in type pattern Map[
t3692-old.scala:15: warning: non-variable type argument Int in type pattern Map[T,Int] is unchecked since it is eliminated by erasure
case m2: Map[T, Int] => new java.util.HashMap[T, Integer]
^
-t3692-old.scala:11: warning: type Manifest in object Predef is deprecated: Use scala.reflect.ClassTag (to capture erasures) or scala.reflect.runtime.universe.TypeTag (to capture types) or both instead
- private final def toJavaMap[T, V](map: Map[T, V])(implicit m1: Manifest[T], m2: Manifest[V]): java.util.Map[_, _] = {
- ^
-t3692-old.scala:11: warning: type Manifest in object Predef is deprecated: Use scala.reflect.ClassTag (to capture erasures) or scala.reflect.runtime.universe.TypeTag (to capture types) or both instead
- private final def toJavaMap[T, V](map: Map[T, V])(implicit m1: Manifest[T], m2: Manifest[V]): java.util.Map[_, _] = {
- ^
t3692-old.scala:15: error: unreachable code
case m2: Map[T, Int] => new java.util.HashMap[T, Integer]
^
-5 warnings found
+three warnings found
one error found
diff --git a/test/files/run/manifests-undeprecated-in-2.10.0.flags b/test/files/run/manifests-undeprecated-in-2.10.0.flags
new file mode 100644
index 0000000000..e8fb65d50c
--- /dev/null
+++ b/test/files/run/manifests-undeprecated-in-2.10.0.flags
@@ -0,0 +1 @@
+-Xfatal-warnings \ No newline at end of file
diff --git a/test/files/run/manifests-undeprecated-in-2.10.0.scala b/test/files/run/manifests-undeprecated-in-2.10.0.scala
new file mode 100644
index 0000000000..82e90b3a89
--- /dev/null
+++ b/test/files/run/manifests-undeprecated-in-2.10.0.scala
@@ -0,0 +1,15 @@
+object Test extends App {
+ def m1a: scala.reflect.Manifest[Int] = scala.reflect.Manifest.Int
+ def m2a: scala.reflect.OptManifest[Int] = ???
+ def m3a = scala.reflect.NoManifest
+
+ def m1b: Manifest[Int] = Manifest.Int
+ def m2b: OptManifest[Int] = ???
+ def m3b = NoManifest
+
+ val m4a = manifest[Int]
+ val m5a = optManifest[Int]
+
+ val m4b = implicitly[Manifest[Int]]
+ val m5b = implicitly[OptManifest[Int]]
+} \ No newline at end of file