scala/scala — pull request #2008 by paulp (2013-01-29 18:50:50+00:00)
Title: Optimization in AsSeenFromMap.

Despite all the eyes which have traveled over this code,
we all managed to miss this:

// Note that pre and clazz are fixed at construction
class AsSeenFromMap(pre: Type, clazz: Symbol) {
...
def apply(tp: Type): Type =
if (skipPrefixOf(pre, clazz)) tp
else ...
}

Additionally, the exclusion condition in asSeenFrom contained
a useless check, here:

// !isPossiblePrefix(clazz) alone is enough
pre.normalize.isTrivial && !isPossiblePrefix(clazz)