Skip to content

Commit

Permalink
SimpleTraitMatcher#preVisit shouldn't call super
Browse files Browse the repository at this point in the history
  • Loading branch information
jkschneider committed Jul 10, 2024
1 parent 03aa622 commit 7a34304
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ public Stream<U> lower(Cursor cursor) {
public <P> TreeVisitor<? extends Tree, P> asVisitor(VisitFunction2<U, P> visitor) {
return new TreeVisitor<Tree, P>() {
@Override
public @Nullable Tree preVisit(Tree tree, P p) {
public Tree preVisit(Tree tree, P p) {
U u = test(getCursor());
return u != null ?
super.visit(visitor.visit(u, p), p) :
super.visit(tree, p);
visitor.visit(u, p) :
tree;
}
};
}
Expand Down

0 comments on commit 7a34304

Please sign in to comment.