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

Eric Milles updated GROOVY-11707:
---------------------------------
    Language: groovy

> Inherting the same Generic Interface at different levels in an inheritance 
> hierachy causes error
> ------------------------------------------------------------------------------------------------
>
>                 Key: GROOVY-11707
>                 URL: https://issues.apache.org/jira/browse/GROOVY-11707
>             Project: Groovy
>          Issue Type: Bug
>          Components: Compiler
>    Affects Versions: 5.0.0-beta-1
>            Reporter: Saravanan
>            Priority: Minor
>
> {code:java}
> public class Testing {
>     interface TopLevel extends Comparable {
>         void blah();
>     }
>     interface NextLevel extends TopLevel, Comparable {
>     }
> } {code}
> Compiling this with @CompileStatic enabled results in this error
> {code:java}
> org.codehaus.groovy.control.MultipleCompilationErrorsException: startup 
> failed:
> testdata/plugins/records/RecordTesting.java: 10: The interface Comparable 
> cannot be implemented more than once with different arguments: 
> java.lang.Comparable<java.lang.Object> and java.lang.Comparable
> . At [10:5]  @ line 10, column 5.
>        interface NextLevel extends TopLevel, Comparable {
>        ^ {code}
> Not sure if this is expected behaviour. The error goes away if I extend 
> Comparable<Object>



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to