diff --git a/rewrite-core/src/main/java/org/openrewrite/trait/SimpleTraitMatcher.java b/rewrite-core/src/main/java/org/openrewrite/trait/SimpleTraitMatcher.java index 2d1766113a3..0c025a021ce 100644 --- a/rewrite-core/src/main/java/org/openrewrite/trait/SimpleTraitMatcher.java +++ b/rewrite-core/src/main/java/org/openrewrite/trait/SimpleTraitMatcher.java @@ -76,7 +76,7 @@ public

TreeVisitor asVisitor(VisitFunction2 visitor public @Nullable Tree preVisit(Tree tree, P p) { U u = test(getCursor()); return u != null ? - visitor.visit(u, p) : + super.visit(visitor.visit(u, p), p) : super.visit(tree, p); } };