-
Notifications
You must be signed in to change notification settings - Fork 286
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
NPE when calling returnType on method annotated if method is static and in an inner class #492
Comments
I was not able to reproduce this in KSP's test framework. I also tried to run the playground you provided directly (disabled test), and it seems passing building, and I can also see the corresponding output in |
Corresponding log:
|
Hm, if you ran the tests in the attached project Let me look at the information provided. |
I was able to reproduce with your test, but when I tried to isolate the issue to reproduce and add it to KSP's test framework (which is what I do when working on bugs), I was not able to reproduce with same code. Furthermore, when I just disabled test in your playground and let project build, where TestProcessor should be executing same logic as your test case (visiting the returnType and try to resolve), the build was passing, and I can see the resolved returnType for your inner class method in the printed log. |
I see what you are saying, I nailed it down a bit further to Still looking how to better repro it or maybe find out why it crashes in DeepLinkDispatch and the test and not in the test project. |
Ah I see. Bugs can also depend on the input source code in KSP, can you check if the real life workload crashing crashing in your DeepLinkDispatch processor involves some special source code scenario such as local declarations, or generics (just as examples since these historically caused some edge case bugs)? |
I'm still investigating but this could also be a bug in the compile testing lib then. |
After some more investigation I found that this must be a bug in https://github.com/tschuchortdev/kotlin-compile-testing as the non testing but we saw in DeepLinkDispatch was just a side effect of another issue and not related to this. Found tschuchortdev/kotlin-compile-testing#105 which is describing our issue. Closing this. |
I added a test case to the play ground app that triggers that by adding a new @method annotation and running it on this code:
it works find if the annotated method is in the outer class like this:
Here is the playground app with the test cases added just run the test in the
test-processor
module to repro:playground_with_bug.zip
The text was updated successfully, but these errors were encountered: