-
Notifications
You must be signed in to change notification settings - Fork 291
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
getJvmName throws exception for static java methods #170
Comments
Here is some more debugging information: in I can see I don't fully understand what these scopes are but should we searching all scopes instead? |
Yeah we should do that. That hasn't been an issue for kotlin since static stuff are treated as an inner class. |
This PR fixes a bug where static java declarations were not being resolved properly because we would only look at the main scope of the class declaration but we also need to check the static scope. I've also refactored resolveJavaDeclaration to move common code to helpers. Fixes: google#170
This required a fix where method element return type was not being returned as member (javac implementation does that). Also hit a bug in KSP when calling jvmname for java statics, added a workaround. google/ksp#170 Bug: 160322705 Test: XElementTest Change-Id: Id1ffe436a520bc68f76986328d7d0f794ab24088
This version is important because it also moves KSP's kotlin dependency to 1.4.20. I had to specify more versions for testing because we were getting kotlin compiler dependencies from kotlin compile testing, which is still on 1.4.10. Now compiler-processing-testing artifact explicitly specifies those version to match whatever AndroidX is using. I've also removed workarounds for the following issues as they are fixed. google/ksp#170 google/ksp#174 Bug: 160322705 Test: existing tests Change-Id: If948bcb762d1fad4911cf833a85cda6a36e7c787
For the given source:
calling getJvmName on
staticMethod
throws:The text was updated successfully, but these errors were encountered: