redundant cast: don't highlight conditional with functional branches (IDEA-161971)

This commit is contained in:
Anna.Kozlova
2016-10-04 17:22:39 +02:00
parent 3332a677a6
commit 031f71c5b3
3 changed files with 29 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
import java.util.function.Function;
class Main {
public static void main(String[] args) {
Test test = new Test();
((Function<String, Long>)(args.length == 2 ? (<error descr="Method reference expression is not expected here">test::foo</error>) : <error descr="Method reference expression is not expected here">test::bar</error>)).apply("");
}
static class Test {
public long foo(String s) {
return 0;
}
public long bar(String s) {
return 0;
}
}
}