On Tue, 21 Nov 2023 18:59:51 GMT, Pavel Rappo <pra...@openjdk.org> wrote:

> I'll try to figure out more.

So this method seems to be a proximate-ish cause for that behaviour: 
`JavacParser.topLevelMethodOrFieldDeclaration`. If it gets `null` or comment to 
attach to `JCTree.JCMethodDecl` later depends on the presence of modifiers. 
This is not the case with normal class methods, where the comments are robustly 
attached regardless of whether modifiers are present.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/16461#issuecomment-1821538640

Reply via email to