From c326d15bce108459371567069a7ecbc38388fb84 Mon Sep 17 00:00:00 2001 From: Dmitry Petrashko Date: Fri, 23 Oct 2015 13:59:48 +0200 Subject: Print stack traces before creating stub symbols --- src/dotty/tools/dotc/core/Denotations.scala | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/dotty/tools/dotc/core/Denotations.scala') diff --git a/src/dotty/tools/dotc/core/Denotations.scala b/src/dotty/tools/dotc/core/Denotations.scala index bd03cc056..65df55a9d 100644 --- a/src/dotty/tools/dotc/core/Denotations.scala +++ b/src/dotty/tools/dotc/core/Denotations.scala @@ -193,9 +193,11 @@ object Denotations { */ def requiredSymbol(p: Symbol => Boolean, source: AbstractFile = null, generateStubs: Boolean = true)(implicit ctx: Context): Symbol = disambiguate(p) match { - case MissingRef(ownerd, name) => - if (generateStubs) + case m @ MissingRef(ownerd, name) => + if (generateStubs) { + m.ex.printStackTrace() ctx.newStubSymbol(ownerd.symbol, name, source) + } else NoSymbol case NoDenotation | _: NoQualifyingRef => throw new TypeError(s"None of the alternatives of $this satisfies required predicate") @@ -858,7 +860,9 @@ object Denotations { /** An error denotation that provides more info about the missing reference. * Produced by staticRef, consumed by requiredSymbol. */ - case class MissingRef(val owner: SingleDenotation, name: Name)(implicit ctx: Context) extends ErrorDenotation + case class MissingRef(val owner: SingleDenotation, name: Name)(implicit ctx: Context) extends ErrorDenotation { + val ex: Exception = new Exception + } /** An error denotation that provides more info about alternatives * that were found but that do not qualify. -- cgit v1.2.3