From df0229e4754e8d512aef68c7d2ffbd1d79cb5df5 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Sat, 8 Nov 2014 12:02:54 +0100 Subject: Retract of optimization in computeDenot Needs a weakening of an assertion in assertErased --- src/dotty/tools/dotc/core/Types.scala | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/dotty/tools/dotc/core/Types.scala') 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 } -- cgit v1.2.3