Community
Participate
Working Groups
package invalidSelection; public class A_test131 { public void foo() { /*]*/foo(); class Inner { } foo();/*[*/ Inner inner= new Inner(); } } The ASTNode for the local Type declaration class Inner {...} looks like this: LocalTypeDeclaration.declarationSourceStart == / of /*]*/ although there is a method call foo between the comment and the class Inner {...}
Fix released in HEAD. It is a complement of the fix for 6829, 6833 and 5413. The change in checkAnnotation() was necessary, but I forgot to reset the scanner.commentPtr in case the token is not a modifier. See change in consumeToken(). The problem could be seen if you replace the test case with: package invalidSelection; public class A_test131 { public void foo() { /**]*/foo(); class Inner { } foo();/*[*/ Inner inner= new Inner(); } }