29 void call(Sam0 s) { } |
29 void call(Sam0 s) { } |
30 void call(Sam1 s) { } |
30 void call(Sam1 s) { } |
31 void call(Sam2 s) { } |
31 void call(Sam2 s) { } |
32 <Z> void call(Sam3<Z> s) { } |
32 <Z> void call(Sam3<Z> s) { } |
33 |
33 |
|
34 void call2(Sam0 s) { } |
|
35 void call2(Sam2 s) { } |
|
36 <Z> void call2(Sam3<Z> s) { } |
|
37 |
34 void test() { |
38 void test() { |
35 call(()-> { throw new RuntimeException(); }); //ambiguous - both call(Sam0), call(Sam2), call(Sam3) match |
39 call(()-> { throw new RuntimeException(); }); // ambiguous - call(Sam1) vs. call(Sam2) |
|
40 call2(()-> { throw new RuntimeException(); }); // ok |
36 } |
41 } |
37 } |
42 } |