aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/ast/NavigateAST.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-03-08 18:05:41 +0100
committerMartin Odersky <odersky@gmail.com>2016-03-12 16:08:38 +0100
commit4db804bc7b75038a8b4a36d4132af21e30c15ebc (patch)
tree6a127a76f896506be8cb78038da61987fa5dd3d4 /src/dotty/tools/dotc/ast/NavigateAST.scala
parentc1814a01c9a48b83174055cdc6acc74906106a92 (diff)
downloaddotty-4db804bc7b75038a8b4a36d4132af21e30c15ebc.tar.gz
dotty-4db804bc7b75038a8b4a36d4132af21e30c15ebc.tar.bz2
dotty-4db804bc7b75038a8b4a36d4132af21e30c15ebc.zip
More detailed diagnostic in NavigateAST
Diffstat (limited to 'src/dotty/tools/dotc/ast/NavigateAST.scala')
-rw-r--r--src/dotty/tools/dotc/ast/NavigateAST.scala7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/ast/NavigateAST.scala b/src/dotty/tools/dotc/ast/NavigateAST.scala
index 9c1c17f50..3753c6702 100644
--- a/src/dotty/tools/dotc/ast/NavigateAST.scala
+++ b/src/dotty/tools/dotc/ast/NavigateAST.scala
@@ -17,7 +17,12 @@ object NavigateAST {
case (utree: untpd.Tree) :: _ =>
utree
case _ =>
- throw new Error(i"no untyped tree for $tree, best matching path =\n${untypedPath(tree, exactMatch = false)}%\n====\n%")
+ val loosePath = untypedPath(tree, exactMatch = false)
+ throw new
+ Error(i"""no untyped tree for $tree, pos = ${tree.pos}, envelope = ${tree.envelope}
+ |best matching path =\n$loosePath%\n====\n%
+ |path positions = ${loosePath.map(_.pos)}
+ |path envelopes = ${loosePath.map(_.envelope)}""".stripMargin)
}
/** The reverse path of untyped trees starting with a tree that closest matches