Skip to content

Commit cfaf6f0

Browse files
committed
Don't visit DefTree subtrees in changeNonLocalOwners
1 parent d27adbe commit cfaf6f0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

compiler/src/dotty/tools/dotc/ast/tpd.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -741,9 +741,8 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo {
741741
def traverse(tree: Tree)(implicit ctx: Context): Unit = {
742742
tree match {
743743
case _: DefTree => if(tree.symbol ne NoSymbol) localOwners += tree.symbol
744-
case _ =>
744+
case _ => traverseChildren(tree)
745745
}
746-
traverseChildren(tree)
747746
}
748747
}
749748
traverser.traverse(tree)

0 commit comments

Comments
 (0)