Skip to content

Commit d3ed077

Browse files
dwijnandmichelou
authored andcommitted
Expand on TreeNodeChecker's docs
1 parent 7502c82 commit d3ed077

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
@@ -679,7 +679,11 @@ object TreeChecker {
679679
}
680680
}.apply(tp0)
681681

682-
/** Check that the tree only contains legal children trees */
682+
/** Run some additional checks on the nodes of the trees. Specifically:
683+
*
684+
* - TypeTree can only appear in TypeApply args, New, Typed tpt, Closure
685+
* tpt, SeqLiteral elemtpt, ValDef tpt, DefDef tpt, and TypeDef rhs.
686+
*/
683687
object TreeNodeChecker extends untpd.TreeTraverser:
684688
import untpd._
685689
def traverse(tree: Tree)(using Context) = tree match

0 commit comments

Comments
 (0)