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
1.6.20 Regression: Annotations on Java type parameters #2388
Comments
@owengray-google hi! Is there a test that fails or how did you find this? I'll try to narrow it down, but I need to find a way to reproduce this or check the fix. I looked at the changes between builds 146 and 148 -- either it's the kotlin update itself or something very not obvious that was broken during refactoring, as other updates don't seem related to it. |
Looks like I found the test here: @Test // REGRESSION: go/dokka-upstream-bug/2388
fun `Full documentation parameters table has types with nullability annotations`() { If I revert your changes in this test, it should reproduce the problem, right? |
Unfortunately, it looks like this problem comes from #2326 ( @BarkingBad, any ideas off the top of your head? How I reproduced it:
|
That CL does have some changes to the part of the code that does this. I can't see off the top of my head what could be responsible. At the moment, my only guess is that the cause is that the handling of |
It seems you are right :) Using I've written identical tests for Kotlin and Java, and interestingly enough, this bug is only reproducible for Java. Moreover, there's another issue (or feature, depends on how you look at it), which is to be expected if you think about it. Take this code:
Working on a fix now |
Hi, sorry for missing this conversation, I had a busy time recently. Indeed, this regression was already fixed by me here https://github.com/Kotlin/dokka/pull/2353/files#r813308178 The PR is complete but there was the redundancy of code that I promised @vmishenev to look into that. Unfortunately, I am really short on time recently and I forgot to finish that, hopefully I will find some time this week |
I hope my fix will work, after all I tracked it down by comparing the changes and found out that the previous implementation was having this type as a parameter. Let me know if I could help you somehow @IgnatBeresnev |
Oh, I see, thanks! I think I'll fix it today or tomorrow just so that we can proceed with testing 1.6.20, and I'll also add some unit tests to cover these cases. But you'll need to rebase and maybe fix some conflicts, hopefully that's OK with you. I'll let you know once it's done |
Fixed in master and cherry-picked into the upcoming |
Describe the bug
<T> void foo(@Nullable java.util.List<@NonNull T> previousList)
creates aTypeParameter
forT
which has no annotations.Expected behaviour
The created
TypeParameter
contains the@NonNull
annotation.(I'm not sure whether nullability is correct there, but it is not an error to put a
TYPE_USE
annotation there.)Screenshots
This is a regression in
1.6.10-dev-146
->1.6.20-M1-dev-148
The text was updated successfully, but these errors were encountered: