mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-10 13:17:09 +07:00
convert anonym to inner: ignore used type params as they would be propagated anyway (IDEA-87171)
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
public class Foo {
|
||||
public<T> void foo() {
|
||||
Predicate<T> predicate = ne<caret>w Predicate<T>() {
|
||||
@Override
|
||||
public boolean test(T t) {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private interface Predicate<K> {
|
||||
boolean test(K t);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
public class Foo {
|
||||
public<T> void foo() {
|
||||
Predicate<T> predicate = new MyPredicate<T>();
|
||||
}
|
||||
|
||||
private interface Predicate<K> {
|
||||
boolean test(K t);
|
||||
}
|
||||
|
||||
private static class MyPredicate<T> implements Predicate<T> {
|
||||
@Override
|
||||
public boolean test(T t) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user