mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-25 14:25:04 +07:00
new overload resolution: covariant comparison of return types
This commit is contained in:
+16
@@ -0,0 +1,16 @@
|
||||
class Test {
|
||||
interface I { Object invoke(); }
|
||||
interface IStr { String foo(); }
|
||||
|
||||
private static void call(IStr str) {
|
||||
System.out.println(str);
|
||||
}
|
||||
|
||||
private static void <warning descr="Private method 'call(Test.I)' is never used">call</warning>(I i) {
|
||||
System.out.println(i);
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
call(()-> null);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user