mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 15:27:45 +07:00
conditional expression: ensure return type is primitive short in case of short/byte branches (IDEA-126697)
This commit is contained in:
+8
@@ -0,0 +1,8 @@
|
||||
class Test {
|
||||
private static void <warning descr="Private method 'test(java.lang.Short)' is never used">test</warning>(Short s) { System.out.println("Short:" + s); }
|
||||
private static void test(short s) { System.out.println("short:" + s); }
|
||||
|
||||
public static void main(String ... args) {
|
||||
test(true ? new Short((short) 1) : new Byte((byte) 1));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user