author | mcimadamore |
Wed, 26 Oct 2016 15:41:25 +0100 | |
changeset 41856 | 13a056e8f16e |
parent 26274 | 02a5b23ee21c |
permissions | -rw-r--r-- |
10 | 1 |
/* |
26274
02a5b23ee21c
8055074: Group 9a: golden files for tests in tools/javac dir
sogoel
parents:
5520
diff
changeset
|
2 |
* @test /nodynamiccopyright/ |
10 | 3 |
* @bug 4906586 |
4 |
* @summary Missing ambiguity error when two methods are equally specific |
|
5 |
* @author gafter |
|
6 |
* |
|
26274
02a5b23ee21c
8055074: Group 9a: golden files for tests in tools/javac dir
sogoel
parents:
5520
diff
changeset
|
7 |
* @compile/fail/ref=Ambig3.out -XDrawDiagnostics Ambig3.java |
10 | 8 |
*/ |
9 |
||
10 |
class Test<T,E> { |
|
11 |
public void check(T val){ |
|
12 |
System.out.println("Second check method being called"); |
|
13 |
} |
|
14 |
public E check(E val){ |
|
15 |
System.out.println("First check method being called"); |
|
16 |
return null; |
|
17 |
} |
|
18 |
} |
|
19 |
||
20 |
class Test3 extends Test<String,String> { } |
|
21 |
||
22 |
class ParametericMethodsTest3 { |
|
23 |
public void assertion2() { |
|
24 |
Test3 tRef = new Test3(); |
|
25 |
tRef.check(""); |
|
26 |
} |
|
27 |
} |