Skip to content

Commit

Permalink
Update gc_lint script to match code change
Browse files Browse the repository at this point in the history
  • Loading branch information
seven1m committed Nov 14, 2024
1 parent 833d1d3 commit b12699c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/gc_lint.rb
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def verify_visited(klass, type, name)
details = @classes.fetch(klass)
if garbage_collected?(type)
if (method_lines = details[:visit_children_method])
visits_directly = method_lines.grep(/^\s*visitor\.visit\(&?#{name}/).any?
visits_directly = method_lines.grep(/^\s*visitor\.enqueue\(&?#{name}/).any?
loops_over = method_lines.grep(/for\s*\(.*:\s*\*?#{name}\)/).any?
unless visits_directly || loops_over
@errors << "#{klass}'s visit_children() method does not visit #{name} (type #{type})!"
Expand Down

0 comments on commit b12699c

Please sign in to comment.