mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-09 15:41:26 +07:00
generics: do not prefer interface over super class even if return type is more specific (IDEA-110568)
This commit is contained in:
+20
@@ -0,0 +1,20 @@
|
||||
import java.util.Collection;
|
||||
|
||||
public class IncorrectError extends NarrowClass {
|
||||
public Collection<String> bar() {
|
||||
return super.doStuff();
|
||||
}
|
||||
}
|
||||
|
||||
interface Interface {
|
||||
Collection<String> doStuff();
|
||||
}
|
||||
|
||||
class NarrowClass extends BaseClass implements Interface {
|
||||
}
|
||||
|
||||
class BaseClass {
|
||||
public Collection doStuff() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user