kotlin icon indicating copy to clipboard operation
kotlin copied to clipboard

FE: don't lose annotations on Java primitive arrays

Open pyos opened this issue 3 years ago • 2 comments

^KT-48861 Fixed

pyos avatar Sep 22 '21 11:09 pyos

There are 10 failed tests.

LoadJava8TestGenerated$SourceJava$TypeUseAnnotations:

  • testBaseClassTypeArguments
  • testClassTypeParameterBounds
  • testMethodTypeParameterBounds
  • testReturnType
  • testValueArguments

The same in LoadJava8TestGenerated$CompiledJava$TypeUseAnnotations.

petukhovv avatar Sep 23 '21 07:09 petukhovv

Updated the data.

pyos avatar Sep 23 '21 07:09 pyos

We have finally discussed this PR today. It's simple by itself and could be acceptable. However, it's quite clear that we have a breaking change here, and as I know from you, this breaking change has at least some impact. In this case it's not allowed to add this error without warning. So we propose to implement a warning in K1, instead of an error. K2 already has an error, and it's quite fine.

mglukhikh avatar Oct 10 '22 14:10 mglukhikh

Done - the annotations will only enhance for warnings without the EnhanceNullabilityOfPrimitiveArrays language feature. Not sure about the version, so I've put 1.9 in - should it be the next one instead?

pyos avatar Oct 11 '22 09:10 pyos

Done - the annotations will only enhance for warnings without the EnhanceNullabilityOfPrimitiveArrays language feature. Not sure about the version, so I've put 1.9 in - should it be the next one instead?

Yes, I'd say it should be the next version. However, it's not yet created, so I suggest to leave version 1.9 in your code as is. I will change the language feature version before merging.

mglukhikh avatar Oct 18 '22 09:10 mglukhikh

Note: I performed remote run, all test passed.

mglukhikh avatar Oct 18 '22 14:10 mglukhikh

@dzharkov approved this PR, so I will merge it this week.

@pyos Could you please fill the LC issue in KT-54521? I was told you know how to do it.

mglukhikh avatar Oct 24 '22 11:10 mglukhikh

Finally merged. A lot of thanks :+1:

mglukhikh avatar Oct 26 '22 09:10 mglukhikh