-
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
wrapping method psi to JavaMethodImpl causes exception #265
Labels
bug
Something isn't working
Comments
yigit
added a commit
to yigit/ksp
that referenced
this issue
Jan 24, 2021
This PR fixes a bug where we were wrapping all PsiMethods to JavaMethodImpl without checking if they are constructor. Both cases, we were wrapping them to find the containing class, so I've added an extension function to ModuleClassResolver to find containing descriptor via PsiMethod which abstracts this resolution. Test: extended resolveJavaType and signatureMapper tests to trigger the crash Fixes: google#265
yigit
added a commit
to yigit/ksp
that referenced
this issue
Jan 24, 2021
This PR fixes a bug where we were wrapping all PsiMethods to JavaMethodImpl without checking if they are constructor. Both cases, we were wrapping them to find the containing class, so I've added an extension function to ModuleClassResolver to find containing descriptor via PsiMethod which abstracts this resolution. Also fixes a bug where ClassDescriptor.findEnclosedDescriptor was not checking constructors (also convered in the updated tests). Test: extended resolveJavaType and signatureMapper tests to trigger the crash Fixes: google#265
yigit
added a commit
to yigit/ksp
that referenced
this issue
Jan 24, 2021
This PR fixes a bug where we were wrapping all PsiMethods to JavaMethodImpl without checking if they are constructor. Both cases, we were wrapping them to find the containing class, so I've added an extension function to ModuleClassResolver to find containing descriptor via PsiMethod which abstracts this resolution. Also fixes a bug where ClassDescriptor.findEnclosedDescriptor was not checking constructors (also convered in the updated tests). Test: extended resolveJavaType and signatureMapper tests to trigger the crash Fixes: google#265
neetopia
pushed a commit
that referenced
this issue
Jan 25, 2021
This PR fixes a bug where we were wrapping all PsiMethods to JavaMethodImpl without checking if they are constructor. Both cases, we were wrapping them to find the containing class, so I've added an extension function to ModuleClassResolver to find containing descriptor via PsiMethod which abstracts this resolution. Also fixes a bug where ClassDescriptor.findEnclosedDescriptor was not checking constructors (also convered in the updated tests). Test: extended resolveJavaType and signatureMapper tests to trigger the crash Fixes: #265
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Wehn
resolveJavaDeclaration
is called with a psi that represents a constructor, seems like we need to wrap it into a constructor impl. I guess this also happens in other places where we automatically wrap a PsiMethod into JavaMethodImplThe text was updated successfully, but these errors were encountered: