Alexey Belkov
Alexey Belkov
> the enum constructor is Internal not private You're thinking about the enum itself. But I mean the enum _constructor_, which must be private. In such code, the constructor is...
Also, there are still failing tests, please take a look. org.jetbrains.kotlin.nj2k.TextNewJavaToKotlinCopyPasteConversionTestGenerated#testComments org.jetbrains.kotlin.nj2k.NewJavaToKotlinCopyPasteConversionTestGenerated#testComments
I also recommend manually testing this change on some real files, because a bug here will lead to red code.
Due to my recent optimization, the compiler errors are checked only in testdata that already has "// ERROR" directives. I now realize that this is a mistake, because we can...
So, now `org.jetbrains.kotlin.nj2k.printing.JKCodeBuilder.Visitor#visitParenthesizedExpressionRaw` can drop this code? ``` if (parenthesizedExpression.shouldBePreserved) { printExplicitLabel(parenthesizedExpression) } ``` and here: ``` intentionBasedProcessing(RemoveUnnecessaryParenthesesIntention()) { // skip parentheses that were originally present in Java code it.getExplicitLabelComment()...
> some other postprocessing steps add parentheses, too Yes, looks like `org.jetbrains.kotlin.idea.j2k.post.processing.processings.DiagnosticBasedProcessingsKt#getFixTypeMismatchDiagnosticBasedProcessing` is the culprit. This is easy to fix though. After we do `element.replace(psiFactory.createExpressionByPattern("($0)!!", element.text))`, we can immediately remove...
Sorry, I will probably have to review next week, as I'm trying to get my nullability prototype done!
Previous discussion for reference: https://github.com/JetBrains/intellij-community/pull/2507 (I should not have closed that PR so soon...) Thank you, ~I see that all tests pass~. However, I can't accept this change right now...
Oh, sorry, the tests actually fail. I'm not sure why it worked for me before. The tests are expected to fail after your change, because you're essentially bypassing the whole...
Yes, it seems that J2K doesn't understand advanced nullability annotations (JSR-305, etc), including annotated packages. There is a related issue: https://youtrack.jetbrains.com/issue/KTIJ-25162/J2K-conversion-does-not-support-TypeQualifierDefault Have you tried to invoke "Main menu | Code...