mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
turn refs to super: process anonymous classes; infer type parameters
This commit is contained in:
+20
@@ -0,0 +1,20 @@
|
||||
interface Intf {
|
||||
}
|
||||
|
||||
interface Factory<E extends Intf> {
|
||||
E create();
|
||||
void save(E obj);
|
||||
|
||||
static class helper {
|
||||
static Factory<Intf> get2() {
|
||||
return (Factory)new Factory<Intf>() {
|
||||
public Intf create() { return null; }
|
||||
public void save(Intf obj) { }
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public class Clazz implements Intf {
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
interface Intf {
|
||||
}
|
||||
|
||||
interface Factory<E extends Intf> {
|
||||
E create();
|
||||
void save(E obj);
|
||||
|
||||
static class helper {
|
||||
static Factory<Intf> get2() {
|
||||
return (Factory)new Factory<Clazz>() {
|
||||
public Clazz create() { return null; }
|
||||
public void save(Clazz obj) { }
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public class Clazz implements Intf {
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
interface Intf {
|
||||
}
|
||||
|
||||
interface Factory<E extends Intf> {
|
||||
E create();
|
||||
|
||||
void save(E obj);
|
||||
|
||||
static class helper {
|
||||
static Factory<Intf> get() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public class Clazz implements Intf {
|
||||
void bar() {
|
||||
Intf y = Factory.helper.get().create();
|
||||
Factory.helper.get().save(y);
|
||||
}
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
interface Intf {
|
||||
}
|
||||
|
||||
interface Factory<E extends Intf> {
|
||||
E create();
|
||||
|
||||
void save(E obj);
|
||||
|
||||
static class helper {
|
||||
static Factory<Intf> get() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public class Clazz implements Intf {
|
||||
void bar() {
|
||||
Clazz y = Factory.helper.get().create();
|
||||
Factory.helper.get().save(y);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user