new overload resolution: covariant comparison of return types

This commit is contained in:
Anna Kozlova
2014-04-22 20:02:33 +02:00
parent 98ab76f060
commit 17b020f7c2
4 changed files with 24 additions and 4 deletions
@@ -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);
}
}