Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions compiler/src/dotty/tools/dotc/interactive/Interactive.scala
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,11 @@ object Interactive {
/** The reverse path to the node that closest encloses position `pos`,
* or `Nil` if no such path exists. If a non-empty path is returned it starts with
* the tree closest enclosing `pos` and ends with an element of `trees`.
*
* Note that if the given `pos` points out places for incomplete parses,
* this method returns `errorTermTree` (`Literal(Consotant(null)`).
*
* @see https://github.com/lampepfl/dotty/issues/15294
*/
def pathTo(trees: List[SourceTree], pos: SourcePosition)(using Context): List[Tree] =
pathTo(trees.map(_.tree), pos.span)
Expand Down