aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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