diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2012-06-26 11:00:26 +0200 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2012-07-02 11:44:50 +0200 |
commit | cba0cbb892e991a0946270d1a7da63993f248225 (patch) | |
tree | 47583676e4f3e7ad9e0288a373ee9fd9ac4d2cc4 /test/files/neg/t3692-old.check | |
parent | d14d8178fa39961951d7dd74a37994db86a13063 (diff) | |
download | scala-cba0cbb892e991a0946270d1a7da63993f248225.tar.gz scala-cba0cbb892e991a0946270d1a7da63993f248225.tar.bz2 scala-cba0cbb892e991a0946270d1a7da63993f248225.zip |
Improves backward compatibility of manifests
1) type ClassManifest[T] = ClassTag[T] (solves a problem
with toArray[T: ClassManifest] defined on most of the collections;
if these types weren't aliases, then we won't be able to change
the signature of that method to toArray[T: ClassTag], because
that would break source compatibility for those who override
toArray in their custom collections)
2) Compiler-generated manifests no longer trigger deprecation warnings
(this is implemented by using ClassManifestFactory instead of ClassManifest
and ManifestFactory instead of Manifest)
3) Deprecation messages got improved to reflect the changes
that were introduced in 2.10.0-M4.
Diffstat (limited to 'test/files/neg/t3692-old.check')
-rw-r--r-- | test/files/neg/t3692-old.check | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/test/files/neg/t3692-old.check b/test/files/neg/t3692-old.check index a97a7d31ec..92d71f7e4e 100644 --- a/test/files/neg/t3692-old.check +++ b/test/files/neg/t3692-old.check @@ -1,8 +1,11 @@ -t3692-old.scala:6: warning: object Manifest in package reflect is deprecated: Use TypeTag instead
- new ManifestTester().toJavaMap(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: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]
^
-one warning found
+two warnings found
one error found
|