diff options
author | Martin Odersky <odersky@gmail.com> | 2014-11-08 12:02:54 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-11-09 19:09:52 +0100 |
commit | df0229e4754e8d512aef68c7d2ffbd1d79cb5df5 (patch) | |
tree | bb51f4e29ec44d34b7e6fda479bfb990df887da0 /src/dotty/tools/dotc/core/Types.scala | |
parent | fea26e104d202f3ac755f309d982af4d7ddd7bba (diff) | |
download | dotty-df0229e4754e8d512aef68c7d2ffbd1d79cb5df5.tar.gz dotty-df0229e4754e8d512aef68c7d2ffbd1d79cb5df5.tar.bz2 dotty-df0229e4754e8d512aef68c7d2ffbd1d79cb5df5.zip |
Retract of optimization in computeDenot
Needs a weakening of an assertion in assertErased
Diffstat (limited to 'src/dotty/tools/dotc/core/Types.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/Types.scala | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala index 3953562b2..5d95fae76 100644 --- a/src/dotty/tools/dotc/core/Types.scala +++ b/src/dotty/tools/dotc/core/Types.scala @@ -1175,8 +1175,15 @@ object Types { case d => if (d.validFor.runId != ctx.period.runId) loadDenot - else if (ctx.erasedTypes && lastSymbol != null) - denotOfSym(lastSymbol) // avoid keeping non-sym denotations after erasure; they violate the assertErased contract + // The following branch was used to avoid an assertErased error. + // It's idea was to void keeping non-sym denotations after erasure + // since they violate the assertErased contract. But the problem is + // that when seen again in an earlier phase the denotation is + // still seen as a SymDenotation, whereas it should be a SingleDenotation. + // That's why the branch is disabled. + // + // else if (ctx.erasedTypes && lastSymbol != null) + // denotOfSym(lastSymbol) else d.current } |