diff options
author | Martin Odersky <odersky@gmail.com> | 2013-03-02 11:00:34 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2013-03-02 11:17:14 +0100 |
commit | 24f5a1ef4b8a49b6a2a8c684c1c98bc6a5293813 (patch) | |
tree | b52eef18a9e5fbf630fbdeb104bffd66b950ccdf /src/dotty/tools/dotc/core/TypeOps.scala | |
parent | 49e6eb07bf55cf9eabb260e7b7a8fef45923e8df (diff) | |
download | dotty-24f5a1ef4b8a49b6a2a8c684c1c98bc6a5293813.tar.gz dotty-24f5a1ef4b8a49b6a2a8c684c1c98bc6a5293813.tar.bz2 dotty-24f5a1ef4b8a49b6a2a8c684c1c98bc6a5293813.zip |
Polishing of denotations
1. Dropped owner from denot#asSeenFrom. Code inspection shows that one needs to take the owner of the symbol in each alternative instead.
2. Changed fullName so that terms in the ownerchain leave a trace. Needed for disambiguating private symbols with expanded names. See worksheet nesting.sc for an example.
3. Changed fingerPrint so that only classes with children have their fingerPrints computed. Reason: When we lookup a member of a class initially, it's likely that the member is present, so a bloom filter will not buy us much and will take up memory. For parent classes it's different. We might have found the member already in the child, or in a different parent, so it's more likely that the fingerPrint is effective.
Diffstat (limited to 'src/dotty/tools/dotc/core/TypeOps.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/TypeOps.scala | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/core/TypeOps.scala b/src/dotty/tools/dotc/core/TypeOps.scala index e7377ce18..a8c9af32d 100644 --- a/src/dotty/tools/dotc/core/TypeOps.scala +++ b/src/dotty/tools/dotc/core/TypeOps.scala @@ -34,8 +34,11 @@ trait TypeOps { this: Context => if (sym is TypeParam) { // short-circuit instantiated type parameters // by replacing pre.tp with its alias, if it has one. - val tp2 = tp1.info - if (tp2.isAliasTypeBounds) return tp2.bounds.hi + tp1.info match { + case TypeBounds(lo, hi) if lo eq hi => + return hi + case _ => + } } tp1 } |