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

Paul King closed GROOVY-11550.
------------------------------

> False negative "name clash" when method in child class changes a type argument
> ------------------------------------------------------------------------------
>
>                 Key: GROOVY-11550
>                 URL: https://issues.apache.org/jira/browse/GROOVY-11550
>             Project: Groovy
>          Issue Type: Bug
>          Components: Compiler
>    Affects Versions: 5.0.0-alpha-11, 4.0.24
>            Reporter: Xiaotian Ma
>            Assignee: Eric Milles
>            Priority: Major
>             Fix For: 5.0.0-beta-1
>
>
> h1. Reproduction 
> The compiler should not pass the given code and should give a "name clash" on 
> method "func" in class "A"
> {code:groovy}
> public interface I<T> {
>     public abstract void func(I<Object> arg1);
> }
> public abstract class A extends Object implements I<Object> {
>     public final void func(I<String> arg1) {
>     }
> } {code}
> h1. Expect output
> If class A is a Java class, you can see the error that should be reported by 
> groovyc in javac output.
> {code:java}
> A.java:2: error: name clash: func(I<String>) in A and func(I<Object>) in I 
> have the same erasure, yet neither overrides the other
>     public final void func(I<String> arg1) {
>                       ^
> 1 error {code}



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

Reply via email to