summaryrefslogtreecommitdiff
path: root/test/files/run/t6329_vanilla.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2013-01-14 23:26:16 -0800
committerPaul Phillips <paulp@improving.org>2013-01-14 23:26:16 -0800
commit76b92ef78d3cb68d7e517bb4611efff45955f1e9 (patch)
tree80ae1bf02e9f2235c1cf0cdb7d950e5ea828442d /test/files/run/t6329_vanilla.scala
parent2d4ed8e795b814f3d71bc6bb4949e4c2a5510da8 (diff)
downloadscala-76b92ef78d3cb68d7e517bb4611efff45955f1e9.tar.gz
scala-76b92ef78d3cb68d7e517bb4611efff45955f1e9.tar.bz2
scala-76b92ef78d3cb68d7e517bb4611efff45955f1e9.zip
Modifies "maybeRewrap" to focus more on the maybe.
Existential types are rewrapped under a bunch of conditions unless the operation performed on the underlying type returns the same type by reference equality. That depends on a foundation of predictability which doesn't exist. The upshot is that existential types were rewrapped with abandon, even when the type were identical. This had both performance and correctness implications. Note where the test case output changes like so: -scala.collection.immutable.List[Any] +scala.collection.immutable.List[<?>] That's correctness.
Diffstat (limited to 'test/files/run/t6329_vanilla.scala')
-rw-r--r--test/files/run/t6329_vanilla.scala14
1 files changed, 11 insertions, 3 deletions
diff --git a/test/files/run/t6329_vanilla.scala b/test/files/run/t6329_vanilla.scala
index a31cd5c72e..f2d843896d 100644
--- a/test/files/run/t6329_vanilla.scala
+++ b/test/files/run/t6329_vanilla.scala
@@ -1,4 +1,12 @@
+import scala.reflect.classTag
+
object Test extends App {
- println(classManifest[List[_]])
- println(scala.reflect.classTag[List[_]])
-} \ No newline at end of file
+ println(classManifest[scala.List[_]])
+ println(classTag[scala.List[_]])
+ println(classManifest[scala.collection.immutable.List[_]])
+ println(classTag[scala.collection.immutable.List[_]])
+ println(classManifest[Predef.Set[_]])
+ println(classTag[Predef.Set[_]])
+ println(classManifest[scala.collection.immutable.Set[_]])
+ println(classTag[scala.collection.immutable.Set[_]])
+}