File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
compiler/src/dotty/tools/dotc/ast Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -1379,11 +1379,11 @@ object Trees {
1379
1379
// Ties the knot of the traversal: call `foldOver(x, tree))` to dive in the `tree` node.
1380
1380
def apply (x : X , tree : Tree )(using Context ): X
1381
1381
1382
- def apply (x : X , trees : List [Tree ])(using Context ): X = trees match
1383
- case tree :: rest =>
1384
- apply (apply(x, tree), rest)
1385
- case Nil =>
1386
- x
1382
+ def apply (x : X , trees : List [Tree ])(using Context ): X =
1383
+ def fold ( x : X , trees : List [ Tree ]) : X = trees match
1384
+ case tree :: rest => fold (apply(x, tree), rest)
1385
+ case Nil => x
1386
+ fold(x, trees)
1387
1387
1388
1388
def foldOver (x : X , tree : Tree )(using Context ): X =
1389
1389
if (tree.source != ctx.source && tree.source.exists)
You can’t perform that action at this time.
0 commit comments