minor cleanup for hash consing of types. no review

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@24102 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
This commit is contained in:
rytz 2011-01-26 16:57:26 +00:00
parent 6116d5956b
commit a2c2ad11b3
1 changed files with 3 additions and 2 deletions

View File

@ -1947,8 +1947,7 @@ A type's typeSymbol should never be inspected directly.
object TypeRef extends TypeRefExtractor {
def apply(pre: Type, sym: Symbol, args: List[Type]): Type = {
class rawTypeRef extends TypeRef(pre, sym, args) with UniqueType
unique(new rawTypeRef)
unique(new TypeRef(pre, sym, args) with UniqueType)
}
}
@ -2611,6 +2610,8 @@ A type's typeSymbol should never be inspected directly.
var sym1 = rebind(pre, sym)
val pre1 = removeSuper(pre, sym1)
if (pre1 ne pre) sym1 = rebind(pre1, sym1)
// why not do the hash-consing in the SingleType.apply()
// factory, like the other UniqueTypes?
unique(new SingleType(pre1, sym1) with UniqueType)
}
}