From 9203e01ddd141ddbb96e3064be5e894ddb666fd8 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Fri, 18 Apr 2014 17:43:40 +0200 Subject: Some more debug info. --- src/dotty/tools/dotc/core/Denotations.scala | 2 +- src/dotty/tools/dotc/transform/Erasure.scala | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/dotty/tools/dotc/core/Denotations.scala b/src/dotty/tools/dotc/core/Denotations.scala index e5f5e6f87..9eab2bd04 100644 --- a/src/dotty/tools/dotc/core/Denotations.scala +++ b/src/dotty/tools/dotc/core/Denotations.scala @@ -600,7 +600,7 @@ object Denotations { case denot: SymDenotation => s"in ${denot.owner}" case _ => "" } - def msg = s"stale symbol; $this#${symbol.id} $ownerMsg, defined in run ${myValidFor.runId}, is referred to in run ${ctx.runId}" + def msg = s"stale symbol; $this#${symbol.id} $ownerMsg, defined in ${myValidFor}, is referred to in run ${ctx.period}" throw new StaleSymbol(msg) } diff --git a/src/dotty/tools/dotc/transform/Erasure.scala b/src/dotty/tools/dotc/transform/Erasure.scala index 9473bf10a..e6d012d68 100644 --- a/src/dotty/tools/dotc/transform/Erasure.scala +++ b/src/dotty/tools/dotc/transform/Erasure.scala @@ -198,7 +198,7 @@ object Erasure { */ override def typedSelect(tree: untpd.Select, pt: Type)(implicit ctx: Context): Tree = { val sym = tree.symbol - assert(sym.exists) + assert(sym.exists, tree.show) def select(qual: Tree, sym: Symbol): Tree = untpd.cpy.Select(tree, qual, sym.name) withType qual.tpe.select(sym) @@ -245,6 +245,8 @@ object Erasure { case mt: MethodType => val args1 = args.zipWithConserve(mt.paramTypes)(typedExpr) untpd.cpy.Apply(tree, fun1, args1) withType mt.resultType + case _ => + throw new MatchError(i"tree $tree has uxpected type of function ${fun1.tpe.widen}, was ${fun.typeOpt.widen}") } } -- cgit v1.2.3