mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
proceed static factories instead of constructors to calculate expected types when diamonds are used (IDEA-153520)
This commit is contained in:
+20
@@ -0,0 +1,20 @@
|
||||
class Outer <U, V> {
|
||||
|
||||
|
||||
Outer(Foo<? super U> a) {}
|
||||
Outer(Bar<? super U, ? extends V> a) {}
|
||||
|
||||
{
|
||||
Outer<String, String> o = new Outer<>(new Foo<String>() {
|
||||
@Override
|
||||
public void m() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
interface Foo<A> {
|
||||
void m();
|
||||
}
|
||||
interface Bar<A, B> {}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
class Outer <U, V> {
|
||||
|
||||
|
||||
Outer(Foo<? super U> a) {}
|
||||
Outer(Bar<? super U, ? extends V> a) {}
|
||||
|
||||
{
|
||||
Outer<String, String> o = new Outer<>(new F<caret>);
|
||||
}
|
||||
}
|
||||
|
||||
interface Foo<A> {
|
||||
void m();
|
||||
}
|
||||
interface Bar<A, B> {}
|
||||
Reference in New Issue
Block a user