redundant explicit types: available inside nested calls for java 8 (IDEA-134160)

This commit is contained in:
Anna Kozlova
2016-01-04 19:25:03 +01:00
parent bcdc7fd50e
commit 82773c69e0
7 changed files with 124 additions and 26 deletions
@@ -0,0 +1,12 @@
// "Remove explicit type arguments" "true"
import java.util.List;
class Collectors {
{
List<String> l = Collectors.of();
}
public static <E> List<E> of() {
return null;
}
}
@@ -0,0 +1,13 @@
// "Remove explicit type arguments" "true"
import java.util.List;
class Collectors {
public static void foo(List<String> list) {}
{
foo(Collectors.of());
}
public static <E> List<E> of() {
return null;
}
}
@@ -0,0 +1,12 @@
// "Remove explicit type arguments" "true"
import java.util.List;
class Collectors {
{
List<String> l = Collectors.<Str<caret>ing>of();
}
public static <E> List<E> of() {
return null;
}
}
@@ -0,0 +1,13 @@
// "Remove explicit type arguments" "true"
import java.util.List;
class Collectors {
public static void foo(List<String> list) {}
{
foo(Collectors.<Str<caret>ing>of());
}
public static <E> List<E> of() {
return null;
}
}
@@ -0,0 +1,13 @@
// "Remove explicit type arguments" "false"
import java.util.List;
class Collectors {
public static <T> void foo(List<T> list) {}
{
foo(Collectors.<Str<caret>ing>of());
}
public static <E> List<E> of() {
return null;
}
}