diff options
-rw-r--r-- | src/dotty/tools/dotc/Compiler.scala | 6 | ||||
-rw-r--r-- | src/dotty/tools/dotc/Run.scala | 1 | ||||
-rw-r--r-- | src/dotty/tools/dotc/core/TypeComparer.scala | 9 |
3 files changed, 12 insertions, 4 deletions
diff --git a/src/dotty/tools/dotc/Compiler.scala b/src/dotty/tools/dotc/Compiler.scala index 943b54d7f..c5c1d8713 100644 --- a/src/dotty/tools/dotc/Compiler.scala +++ b/src/dotty/tools/dotc/Compiler.scala @@ -45,8 +45,10 @@ class Compiler { List(new RefChecks, new ElimRepeated, new ElimLocals, - new ExtensionMethods, - new TailRec), + new ExtensionMethods), + List(new TailRec), // TailRec needs to be in its own group for now. + // Otherwise it produces -Ycheck incorrect code for + // file core/Decorators.scala. List(new PatternMatcher, new ExplicitOuter, new Splitter), diff --git a/src/dotty/tools/dotc/Run.scala b/src/dotty/tools/dotc/Run.scala index f7d89e897..abee30aab 100644 --- a/src/dotty/tools/dotc/Run.scala +++ b/src/dotty/tools/dotc/Run.scala @@ -46,6 +46,7 @@ class Run(comp: Compiler)(implicit ctx: Context) { .filterNot(ctx.settings.Yskip.value.containsPhase(_)) // TODO: skip only subphase for (phase <- phasesToRun) if (!ctx.reporter.hasErrors) { + if (ctx.settings.verbose.value) println(s"[$phase]") units = phase.runOn(units) def foreachUnit(op: Context => Unit)(implicit ctx: Context): Unit = for (unit <- units) op(ctx.fresh.setPhase(phase.next).setCompilationUnit(unit)) diff --git a/src/dotty/tools/dotc/core/TypeComparer.scala b/src/dotty/tools/dotc/core/TypeComparer.scala index faeef559c..720e372d2 100644 --- a/src/dotty/tools/dotc/core/TypeComparer.scala +++ b/src/dotty/tools/dotc/core/TypeComparer.scala @@ -167,8 +167,13 @@ class TypeComparer(initctx: Context) extends DotClass with ConstraintHandling wi ) } ) - else (tp1.name eq tp2.name) && isSameType(tp1.prefix, tp2.prefix) - ) || isHKSubType || secondTryNamed(tp1, tp2) + else + (tp1.name eq tp2.name) && + isSameType(tp1.prefix, tp2.prefix) && + (tp1.signature == tp1.signature) && + !tp1.isInstanceOf[WithFixedSym] && + !tp2.isInstanceOf[WithFixedSym] + ) || isHKSubType || secondTryNamed(tp1, tp2) case tp1: ThisType if tp1.cls eq tp2.symbol.moduleClass => isSubType(tp1.cls.owner.thisType, tp2.prefix) case _ => |