I've read the other questions related to erasures, but I'm still not clear why I get the compile error in the class below. The other questions involve methods that actually use the generic type, whereas I'm just trying to implement a method using the exact same signature. Can anyone explain?
Compile error -> name clash: bar(java.util.Set) in test.Baz and bar(java.util.Set) in test.Foo have the same erasure, yet neither overrides the other
import java.util.Set;
public class test {
public interface Foo<T> {
public void bar(Set<String> s);
}
public abstract class Baz implements Foo {
public void bar(Set<String> s) {}
}
}