mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
testdata for IDEA-157926
GitOrigin-RevId: 0227aa27f1329ae64011e737291f27338ed5a825
This commit is contained in:
committed by
intellij-monorepo-bot
parent
06d5a740c0
commit
0ed0e007ee
@@ -0,0 +1,16 @@
|
||||
|
||||
import java.util.function.Consumer;
|
||||
|
||||
class Program {
|
||||
static <T> T foo(Consumer<T> c) {
|
||||
c.accept(null);
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
long l = (<warning descr="Casting 'foo(...)' to 'long' is redundant">long</warning>)foo(x -> bar(x));
|
||||
}
|
||||
|
||||
static void bar(Long x) { System.out.println(1);}
|
||||
static void bar(Object x) { System.out.println(2); }
|
||||
}
|
||||
@@ -48,4 +48,5 @@ public class RedundantCast18Test extends LightDaemonAnalyzerTestCase {
|
||||
public void testDiamondWithUpperBounds() { doTest();}
|
||||
public void testBinaryConversions() { doTest();}
|
||||
public void testInferenceIncompatibilityWithoutCast() { doTest();}
|
||||
public void testCastToPrimitive() { doTest();}
|
||||
}
|
||||
Reference in New Issue
Block a user