-
Notifications
You must be signed in to change notification settings - Fork 19
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
Change in handling of nullable arrays with eisop 3.42.0 #673
Comments
Thanks, Liam! Note also that the JetBrains annotations were formerly not usable as type-use annotations, only as declaration annotations. In fact, kotlinc downloads still come bundled with the |
Thanks for tracing this down and for the minimal test case, @cushon! In #658 I thought that this change was just a semantic-preserving change to make the code more uniform. I was wrong. I hopefully fix this again in #674. I added a test case to try to avoid this backsliding in the future and cleaned up the code a bit. Hopefully... One thing to note: when compiling
This is why the return type of that method is treated as Feedback, here or on #674, is always welcome! |
Thank you! I think the Java 8+ output for that example is expected. I don't have a strong opinion about what the best thing for the analysis to do in that situation is. |
+1, thanks. Ouch on that method name! For the Java 8+ output, I lean more toward what I'd describe as "Do what the bytecode says," which I'd consider to be "nullable array of nullable strings." In practice, I hope to mostly not care: We'll eventually try to get Google code off of hybrid type-use/declaration annotations like JetBrains's, at which point we should see them only in the output of kotlinc, which matches the I was going to then add: "For all we know, the source code might have been ' Still, I feel good about the principle of treating Additionally, cushon@ recently dug up JDK-8223936 (which was also in the list of type-use-annotation bugs that you'd provided), so I would really not want to work too hard to reverse-engineer user intent from the current javac behavior, which doesn't even appear to be correct in all cases. You know, that's all really more an argument for keeping whatever your current behavior is (after this fix), regardless of whether it matches my preferences :) |
The following example is similar to an issue seen in the wild where kotlinc emits code where
org.jetbrains.annotations.Nullable
appears as a declaration annotation (and not as a type annotation). Similar behaviour can be seen with javac when targeting language levels that do not support type use annotations.(This repro is based on b/318857000.)
Repro
The text was updated successfully, but these errors were encountered: