diff options
author | Martin Odersky <odersky@gmail.com> | 2016-03-08 18:05:41 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-03-12 16:08:38 +0100 |
commit | 4db804bc7b75038a8b4a36d4132af21e30c15ebc (patch) | |
tree | 6a127a76f896506be8cb78038da61987fa5dd3d4 /src | |
parent | c1814a01c9a48b83174055cdc6acc74906106a92 (diff) | |
download | dotty-4db804bc7b75038a8b4a36d4132af21e30c15ebc.tar.gz dotty-4db804bc7b75038a8b4a36d4132af21e30c15ebc.tar.bz2 dotty-4db804bc7b75038a8b4a36d4132af21e30c15ebc.zip |
More detailed diagnostic in NavigateAST
Diffstat (limited to 'src')
-rw-r--r-- | src/dotty/tools/dotc/ast/NavigateAST.scala | 7 |
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 |