Skip to content

Commit 8f5ee23

Browse files
committed
Expand on TreeNodeChecker's docs
1 parent 7af2560 commit 8f5ee23

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

compiler/src/dotty/tools/dotc/transform/TreeChecker.scala

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,11 @@ object TreeChecker {
648648
}
649649
}.apply(tp0)
650650

651-
/** Check that the tree only contains legal children trees */
651+
/** Run some additional checks on the nodes of the trees. Specifically:
652+
*
653+
* - TypeTree can only appear in TypeApply args, New, Typed tpt, Closure
654+
* tpt, SeqLiteral elemtpt, ValDef tpt, DefDef tpt, and TypeDef rhs.
655+
*/
652656
object TreeNodeChecker extends untpd.TreeTraverser:
653657
import untpd._
654658
def traverse(tree: Tree)(using Context) = tree match

0 commit comments

Comments
 (0)