aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Denotations.scala
diff options
context:
space:
mode:
authorDmitry Petrashko <dmitry.petrashko@gmail.com>2015-10-23 13:59:48 +0200
committerDmitry Petrashko <dmitry.petrashko@gmail.com>2015-10-23 13:59:48 +0200
commitc326d15bce108459371567069a7ecbc38388fb84 (patch)
tree963a484292991e1c8a27b676ac11b0c0b6f8dc71 /src/dotty/tools/dotc/core/Denotations.scala
parent14d20d9bacb713da046ada786673935e4ff4a8c2 (diff)
downloaddotty-c326d15bce108459371567069a7ecbc38388fb84.tar.gz
dotty-c326d15bce108459371567069a7ecbc38388fb84.tar.bz2
dotty-c326d15bce108459371567069a7ecbc38388fb84.zip
Print stack traces before creating stub symbols
Diffstat (limited to 'src/dotty/tools/dotc/core/Denotations.scala')
-rw-r--r--src/dotty/tools/dotc/core/Denotations.scala10
1 files changed, 7 insertions, 3 deletions
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.