-
Notifications
You must be signed in to change notification settings - Fork 299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix handling of static imports from subclasses #904
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #904 +/- ##
============================================
- Coverage 86.98% 86.97% -0.02%
- Complexity 1959 1965 +6
============================================
Files 77 77
Lines 6330 6348 +18
Branches 1223 1229 +6
============================================
+ Hits 5506 5521 +15
- Misses 420 421 +1
- Partials 404 406 +2 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes LGTM, but I have one clarifying question due to my unfamiliarity with the rest of the codebase.
methodSymbol = baseSymbol; | ||
} | ||
} | ||
return methodSymbol; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: I'm a bit confused about the previous code. It suggests that we actually want the methodSymbol
and we only resolve to baseSymbol
under certain conditions (i.e., interface method corresponding to one from java.lang.Object
). But it seems with the updated code that we actually always want baseSymbol
?
Am I missing something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's a good question, this was due to my misunderstanding before. Basically, always getting the base symbol is safe, since if there is no different base symbol the baseSymbol()
method just returns this
. I didn't understand this before; more detail in this comment. In the next EP version the getSymbol
overload for MethodInvocationTree
will always call baseSymbol()
, so in some cases it may get called twice, but that is fine.
Fixes #764