RFR: JDK-8315458 Implement JEP 463: Implicitly Declared Classes and Instance Main Method (Second Preview) [v31]

Pavel Rappo prappo at openjdk.org
Tue Nov 21 19:21:27 UTC 2023


On Tue, 21 Nov 2023 18:59:51 GMT, Pavel Rappo <prappo at 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


More information about the compiler-dev mailing list