java overload resolution: check constructors by name of the containing class (IDEA-249525)

GitOrigin-RevId: 30fe9e5615f36361bba40b740719a274c9f6786b
This commit is contained in:
Anna Kozlova
2020-08-31 13:15:05 +02:00
committed by intellij-monorepo-bot
parent f8b3d071f1
commit 056ee5b158
3 changed files with 39 additions and 1 deletions

View File

@@ -0,0 +1,29 @@
import java.util.*;
class MyTest extends AbstractList {
MyTest(String name) {
super(name);
}
protected Task getF(List<String> files) {
return new Foo<>(new ArrayL<caret>ist<>(files)) {
@Override
protected void a() { }
};
}
private abstract class Foo<T extends String> extends Task<T> {
public Foo(List<T> files) {
super();
}
protected abstract void a();
}
}
class Task<K> {
protected Task() {
}
protected Task(String name) {}
}