author | vromero |
Tue, 24 Apr 2018 08:13:30 -0700 | |
changeset 49872 | 0798eab12791 |
parent 47216 | 71c04702a3d5 |
permissions | -rw-r--r-- |
10 | 1 |
/* |
25694
ba47ecb5bfee
8048837: .out files for generics tests in tools/javac dir - part 3
sogoel
parents:
5520
diff
changeset
|
2 |
* @test /nodynamiccopyright/ |
10 | 3 |
* @bug 6270396 6245699 |
4 |
* @summary Missing bridge for final method (gives AbstractMethodError at runtime) |
|
25694
ba47ecb5bfee
8048837: .out files for generics tests in tools/javac dir - part 3
sogoel
parents:
5520
diff
changeset
|
5 |
* @compile/fail/ref=T6245699b.out -XDrawDiagnostics T6245699b.java |
10 | 6 |
*/ |
7 |
||
8 |
public class T6245699b { |
|
9 |
public static void main(String[] args) { |
|
10 |
IBar b = new Bar(); |
|
11 |
String x = b.doIt(); |
|
12 |
} |
|
13 |
||
14 |
static class Foo<T> { |
|
15 |
public final T doIt() { return null; } |
|
16 |
} |
|
17 |
||
18 |
static interface IBar { |
|
19 |
String doIt(); |
|
20 |
} |
|
21 |
||
22 |
static class Bar extends Foo<String> implements IBar { |
|
23 |
public String doIt() { // assert that a final method can't be overridden |
|
24 |
return null; |
|
25 |
} |
|
26 |
} |
|
27 |
} |