Open cushon opened 9 years ago
Original comment posted by mdempsky@google.com on 2013-10-01 at 01:01 AM
I put together https://github.com/cushon/issues-import/commits/mdempsky which has two commits:
I think there's still a lot to go (e.g., the classes in the bugpatterns package), but I wanted to at least get these out for review to see if y'all agree with the direction I'm going here.
Original comment posted by eaftan@google.com on 2013-10-01 at 04:41 PM
Nice catch! You're totally right that the VisitorState will be incorrect.
Let me look at your branch and post comments there.
Original issue created by mdempsky@google.com on 2013-09-23 at 07:53 PM
In CompoundAssignment.matches(), this return statement is erroneous:
because the VisitorState passed to the submatchers will have the wrong TreePath (i.e., it will still have a TreePath for the compoundAssignmentTree expression instead of the appropriate subexpression).
It should actually be something like:
where:
Looking through Matchers, a lot of other helpers are similarly buggy (methodHasParameters, hasMethod, variableType).
So probably: