RFR: 8332497: javac crashes when annotation processing runs on program with module imports
Evemose
duke at openjdk.org
Sun May 19 21:16:22 UTC 2024
On Sun, 19 May 2024 12:19:25 GMT, Chen Liang <liach at openjdk.org> wrote:
>> Fix is pretty simple: visitModuleImport in com.sun.tools.javac.tree.TreeScanner has notbeen overriden, so defaulted to Visitor::visitModuleImport, which forwards to Visitor::visitTree, which is also not overriden, and, therefore, threw AssertionError.
>>
>> PS: Im not even sure how it worked before without crashing, seems like there is some intermidiate implementation between this TreeScanner and actual scanners because otherwise it should have resultedin compile error the moment it encounter module importin any visitor
>
> I recommend adding a minimal test case for this bug, like the one from the JBS issue.
@liach been done. It's my first time writing javac tests so I am not sure I have done everything in the best way, but I've tried my best
-------------
PR Comment: https://git.openjdk.org/jdk/pull/19292#issuecomment-2119361931
More information about the compiler-dev
mailing list