diff options
author | Lukas Rytz <lukas.rytz@epfl.ch> | 2011-01-26 16:57:26 +0000 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@epfl.ch> | 2011-01-26 16:57:26 +0000 |
commit | 6d0718b5ec19a58842e72cb01454fee259e49843 (patch) | |
tree | 14c54407eeb5b59b62e9fb306998c370e3831a55 | |
parent | 6d43731ecf5f03fb3aa1f1aa062df51026a859fe (diff) | |
download | scala-6d0718b5ec19a58842e72cb01454fee259e49843.tar.gz scala-6d0718b5ec19a58842e72cb01454fee259e49843.tar.bz2 scala-6d0718b5ec19a58842e72cb01454fee259e49843.zip |
minor cleanup for hash consing of types. no review
-rw-r--r-- | src/compiler/scala/tools/nsc/symtab/Types.scala | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/symtab/Types.scala b/src/compiler/scala/tools/nsc/symtab/Types.scala index 4dfde951bd..1633b82b65 100644 --- a/src/compiler/scala/tools/nsc/symtab/Types.scala +++ b/src/compiler/scala/tools/nsc/symtab/Types.scala @@ -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) } } |