mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
java redundant cast: cleanup: avoid dbl cast registration for expressions with expected type
GitOrigin-RevId: a31b1d892b2e19bfaf556e85724eb244189111b4
This commit is contained in:
committed by
intellij-monorepo-bot
parent
c3bda2dac0
commit
efc6106e02
+2
-1
@@ -2,6 +2,7 @@ import java.io.*;
|
||||
interface Predicate<T> {
|
||||
boolean test(String s);
|
||||
}
|
||||
interface I {}
|
||||
class Test {
|
||||
private static boolean test(String s) {
|
||||
return false;
|
||||
@@ -9,6 +10,6 @@ class Test {
|
||||
|
||||
{
|
||||
Predicate<String> mh1 = (Predicate<String> & Serializable)Test::test;
|
||||
Predicate<String> mh0 = (<warning descr="Casting 'Test::test' to 'Predicate<String> & Predicate<String>' is redundant">Predicate<String> & <error descr="Repeated interface">Predicate<String></error></warning>)Test::test;
|
||||
Predicate<String> mh0 = (I & Predicate<String>) (<warning descr="Casting 'Test::test' to 'Predicate<String>' is redundant">Predicate<String></warning>)Test::test;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user