redundant cast: special processing for functional expressions as enum args (IDEA-154354)

This commit is contained in:
Anna.Kozlova
2016-04-15 16:04:38 +02:00
parent b701c29875
commit 09f46115cf
7 changed files with 50 additions and 21 deletions

View File

@@ -0,0 +1,12 @@
import java.util.function.Supplier;
enum E {
A( (<warning descr="Casting 'E::f' to 'Supplier<Object>' is redundant">Supplier<Object></warning>)E::f),
B( (Supplier<String>)E::f),
;
<T> E(Supplier<T> s){}
static <K> K f() {
return null;
}
}