You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think that the SortNodes rewriter doesn't preserve the position of private and protected, causing it to change the privacy of methods. For example, I would expect this input:
So that method b which should be private has become public, and c which should be protected is also public.
If my understanding is correct, the problem is in the node.nodes.sort! call in the SortNodes visitor, which currently sorts all the nodes. I think it needs to first segment the nodes into public, private, and protected ranges and sort those ranges individually. Would a PR to fix this be helpful?
The text was updated successfully, but these errors were encountered:
I think that the
SortNodes
rewriter doesn't preserve the position ofprivate
andprotected
, causing it to change the privacy of methods. For example, I would expect this input:to produce
but it sorts everything and produces
So that method
b
which should be private has become public, andc
which should be protected is also public.If my understanding is correct, the problem is in the
node.nodes.sort!
call in theSortNodes
visitor, which currently sorts all the nodes. I think it needs to first segment the nodes into public, private, and protected ranges and sort those ranges individually. Would a PR to fix this be helpful?The text was updated successfully, but these errors were encountered: