-
Notifications
You must be signed in to change notification settings - Fork 8
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
Kotlin 2.0.21 - java.lang.NullPointerException during compilation #53
Comments
@zkovar are you sure it happened while migrating from 2.0.20 to 2.0.21? From stack trace, it does not seem as a regular broken compatibility. It could be some behavioral change on the kotlin compiler side, but it is not very likely in a patch release. Anyway, could you:
I would be grateful for a minimal reproducer or maybe you will be able to figure out what causes the issue. To give you some hint: from the stack trace it seems that type you want to mock have a property without a getter. It should not be really possible, but maybe you have something unusual in you property definition. |
@lupuuss yes, can confirm we're seeing this when the only change in our project is attempting to bump the Kotlin version from 2.0.20 to 2.0.21 (mainly for Xcode 16 support). I'll debug further and try to create a small reproducing project within a few days. Thanks! |
@zkovar do you have any update? |
@lupuuss not yet - getting back to this today. I'm currently trying to debug if we have any bad tests configured that could be causing this |
Well well - your hunch was right 😄 . We had one bad test file that, for some reason, when updating from 2.0.20 to 2.0.21, led to this exception. Everything else works, so I think we can close this issue and debug the test on our end. Thanks! I'll report back when I figure out why that test failed |
Ok fine. I will add null check before accessing getter just in case. I'm not sure how effective it will be, because getter should not be null and it might be a symptom of something else. I'm closing the issue until you find something. Thank you for reporting this! |
When attempting to update our project from 2.0.20 to 2.0.21, I see tests failing to run due to
Originally posted by @zkovar in #48 (comment)
The text was updated successfully, but these errors were encountered: