scala/scala — pull request #1900 by paulp (2013-01-15 07:34:39+00:00)
Title: 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.