[ https://issues.apache.org/jira/browse/GROOVY-11642?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17949291#comment-17949291 ]
ASF GitHub Bot commented on GROOVY-11642: ----------------------------------------- eric-milles commented on PR #2211: URL: https://github.com/apache/groovy/pull/2211#issuecomment-2849266564 I checked field, method and compact constructor. The first two already include annotations and modifiers in their source offset and the compact constructor is mapped to a closure in the `TupleConstructor` `pre` attribute. So this is ready to merge. > source offset of inner class declaration with annotation > -------------------------------------------------------- > > Key: GROOVY-11642 > URL: https://issues.apache.org/jira/browse/GROOVY-11642 > Project: Groovy > Issue Type: Bug > Components: parser-antlr4 > Reporter: Eric Milles > Assignee: Eric Milles > Priority: Major > > Consider the following: > {code:groovy} > class Outer { > @Deprecated > public class Inner { > } > } > {code} > Under the old parser, the source range for {{Inner}} starts at the > annotation. The new parser starts at the line and column of the {{class}} > keyword. You can compare against how an outer class with an annotation gets > ranged. > This line does not expand the source range using {{ctx}} as is done for an > outer class. > https://github.com/apache/groovy/blob/1eeb735e303fdb230feb03ea3b3f44f7e7750e66/src/main/java/org/apache/groovy/parser/antlr4/AstBuilder.java#L1584 > It is possible that the other member options -- method, field and compact > constructor -- also fail to include the range of other annotations / > modifiers. I have not checked, but it looks suspect. -- This message was sent by Atlassian Jira (v8.20.10#820010)