[jira] [Commented] (GROOVY-8628) Groovydoc fails to parse Java static nested classes with diamond operator

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (GROOVY-8628) Groovydoc fails to parse Java static nested classes with diamond operator

JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/GROOVY-8628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16503169#comment-16503169 ]

ASF GitHub Bot commented on GROOVY-8628:
----------------------------------------

Github user av-m commented on a diff in the pull request:

    https://github.com/apache/groovy/pull/748#discussion_r193378890
 
    --- Diff: src/main/antlr2/org/codehaus/groovy/antlr/java/java.g ---
    @@ -402,10 +402,9 @@ wildcardType
      (("extends" | "super")=> typeArgumentBounds)?
      ;
     
    -typeArgumentsDiamond
    -{Token first = LT(1);}
    +typeArgumentsOrDiamond
         :   LT! GT!
    -    {#typeArgumentsDiamond = #(create(TYPE_ARGUMENTS, "TYPE_ARGUMENTS",first,LT(1)), #typeArgumentsDiamond);}
    --- End diff --
   
    Since this concerns diamond operators I could not think of any case where actual type arguments could be extracted.


> Groovydoc fails to parse Java static nested classes with diamond operator
> -------------------------------------------------------------------------
>
>                 Key: GROOVY-8628
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8628
>             Project: Groovy
>          Issue Type: Bug
>          Components: GroovyDoc
>            Reporter: Marco-Antonio Avallone
>            Priority: Major
>
> Failing source file example:
> {code:java}
> public class JavaClass<E> {
>     JavaClass() { }
>     public static class Nested<E> extends JavaClass<E> {
>         Nested() { }
>     }
> }
> JavaClass<Object> expectedObject = new JavaClass.Nested<>();
> {code}
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)