author | sogoel |
Fri, 15 May 2015 16:53:42 -0700 | |
changeset 30721 | 1024d425d97e |
parent 30719 | 91834c070ba5 |
permissions | -rw-r--r-- |
10 | 1 |
/* |
30719
91834c070ba5
8074417: Group 13a: golden files for tests in tools/javac/generics dir
sogoel
parents:
5520
diff
changeset
|
2 |
* @test /nodynamiccopyright/ |
10 | 3 |
* @bug 4949303 |
4 |
* @summary A method returning a raw type cannot override a method returning a generic type |
|
5 |
* @author gafter |
|
6 |
* |
|
2985
f43e1241e7fb
6843761: Update langtools tests to remove unncessary -source and -target options
darcy
parents:
10
diff
changeset
|
7 |
* @compile UncheckedCovariance.java |
30719
91834c070ba5
8074417: Group 13a: golden files for tests in tools/javac/generics dir
sogoel
parents:
5520
diff
changeset
|
8 |
* @compile/fail/ref=UncheckedCovariance.out -XDrawDiagnostics -Xlint:unchecked -Werror UncheckedCovariance.java |
10 | 9 |
*/ |
10 |
||
11 |
class UncheckedCovariance { |
|
12 |
static class Box<T> { } |
|
13 |
static class A { |
|
14 |
Box<Integer> f() { return null; } |
|
15 |
} |
|
16 |
static class B extends A { |
|
17 |
Box f() { return null; } |
|
18 |
} |
|
19 |
} |