15 |
15 |
16 void g(SAM1 s1) { } |
16 void g(SAM1 s1) { } |
17 void g(SAM2 s2) { } |
17 void g(SAM2 s2) { } |
18 |
18 |
19 void test() { |
19 void test() { |
20 g(x->{ String s = x; }); //g(SAM1) |
20 g(x->{ String s = x; }); //ambiguous |
21 g(x->{ Integer i = x; }); //g(SAM2) |
21 g(x->{ Integer i = x; }); //ambiguous |
22 g(x->{ Object o = x; }); //ambiguous |
22 g(x->{ Object o = x; }); //ambiguous |
23 g(x->{ Character c = x; }); //error: inapplicable methods |
23 g(x->{ Character c = x; }); //error: inapplicable methods |
24 g(x->{ Character c = ""; }); //error: incompatible types |
24 g(x->{ Character c = ""; }); //error: incompatible types |
25 } |
25 } |
26 } |
26 } |