You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Eric Milles (Jira)" <ji...@apache.org> on 2021/06/07 19:17:00 UTC

[jira] [Resolved] (GROOVY-10125) FP Cycle detected in type parameter that extends another type parameter

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

Eric Milles resolved GROOVY-10125.
----------------------------------
    Fix Version/s: 4.0.0-beta-1
       Resolution: Fixed

> FP Cycle detected in type parameter that extends another type parameter
> -----------------------------------------------------------------------
>
>                 Key: GROOVY-10125
>                 URL: https://issues.apache.org/jira/browse/GROOVY-10125
>             Project: Groovy
>          Issue Type: Bug
>          Components: Static compilation, Static Type Checker
>            Reporter: Stefanos Chaliasos
>            Assignee: Eric Milles
>            Priority: Major
>             Fix For: 4.0.0-beta-1
>
>
> I have the following Groovy program.
> {code:groovy}
> @groovy.transform.TypeChecked
> class Test<X, Y extends X> {}
> {code}
> h2. Actual Behavior
> The program does not compile, and I get the following error.
> {code:java}
> org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
> Test.groovy: 2: Cycle detected: the type java.lang.Object cannot extend/implement itself or one of its own member types
>  @ line 2, column 25.
>    class Test<X, Y extends X> {}
>                            ^
> 1 error
> {code}
> h2. Expected Behavior
> Compile successfully.
> h2. Comment
> This bug is a regression because it compiles successfully with 3.0.8 and 4.0.0-alpha-3. Specifically, the fix of GROOVY-10113 introduced this bug.
> h2. Affected Version
> This programs have been tested with the compiler from the master (commit: 05a39632565bee88949c8db9d56b9f9598321fc2).



--
This message was sent by Atlassian Jira
(v8.3.4#803005)