convert to diamonds: ensure check for applicability is performed on static factory as otherwise it would be just skipped (IDEA-170813)

This commit is contained in:
Anna.Kozlova
2017-04-05 10:00:19 +02:00
parent 6cff306a08
commit afd31563b0
2 changed files with 21 additions and 1 deletions
@@ -0,0 +1,14 @@
// "Replace with <>" "false"
import java.util.function.Consumer;
class Test {
public static <T extends Comparable<T>> Foo<T> test(Consumer<? super T> function) {
return new Foo<<caret>T>(function);
}
public static class Foo<T extends Comparable<T>> {
Foo(Consumer<? super T> function) { }
}
}