You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (JIRA)" <ji...@apache.org> on 2018/08/26 03:36:00 UTC

[jira] [Closed] (GROOVY-7126) generic type definition with reference to other type parameter fails to compile

     [ https://issues.apache.org/jira/browse/GROOVY-7126?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul King closed GROOVY-7126.
-----------------------------
       Resolution: Fixed
         Assignee: Paul King
    Fix Version/s: 2.5.2

This seems to work in 2.5.2 and master. I presume it was fixed in an earlier 2.5.x version. Please re-open if you have any further problems with the latest version of Groovy.

> generic type definition with reference to other type parameter fails to compile
> -------------------------------------------------------------------------------
>
>                 Key: GROOVY-7126
>                 URL: https://issues.apache.org/jira/browse/GROOVY-7126
>             Project: Groovy
>          Issue Type: Bug
>          Components: Compiler
>    Affects Versions: 2.3.6, 2.4.5, 2.4.15
>            Reporter: Ken Geis
>            Assignee: Paul King
>            Priority: Major
>             Fix For: 2.5.2
>
>
> This compiles with javac but not with groovyc:
> {code:java|title=A.java}
> class A<TypeA extends A<TypeA, TypeB>,
>         TypeB extends B<TypeB, TypeA>> {
> }
> {code}
> {code:java|title=B.java}
> class B<TypeB extends B<TypeB, TypeA>,
>         TypeA extends A<TypeA, TypeB>> {
> }{code}
> {noformat}
> org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
> A.java: 1: unable to resolve class TypeB 
>  @ line 1, column 32.
>    class A<TypeA extends A<TypeA, TypeB>,
>                                   ^
> B.java: 1: unable to resolve class TypeA 
>  @ line 1, column 32.
>    class B<TypeB extends B<TypeB, TypeA>,
>                                   ^
> 2 errors
> {noformat}



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