author | hseigel |
Wed, 02 Mar 2016 23:48:41 +0000 | |
changeset 36397 | c487ced7231c |
parent 30721 | 1024d425d97e |
permissions | -rw-r--r-- |
10 | 1 |
/* |
30721
1024d425d97e
8074425: Group 13b: golden files for tests in tools/javac/generics dir
sogoel
parents:
5520
diff
changeset
|
2 |
* @test /nodynamiccopyright/ |
10 | 3 |
* @bug 4951260 |
4 |
* @summary compiler disallows raw call to generic constructor |
|
5 |
* @author gafter |
|
6 |
* |
|
2985
f43e1241e7fb
6843761: Update langtools tests to remove unncessary -source and -target options
darcy
parents:
10
diff
changeset
|
7 |
* @compile -Werror UncheckedConstructor.java |
30721
1024d425d97e
8074425: Group 13b: golden files for tests in tools/javac/generics dir
sogoel
parents:
5520
diff
changeset
|
8 |
* @compile/fail/ref=UncheckedConstructor.out -XDrawDiagnostics -Werror -Xlint:unchecked UncheckedConstructor.java |
10 | 9 |
*/ |
10 |
||
11 |
import java.util.*; |
|
12 |
||
13 |
class G3 { |
|
14 |
||
15 |
G3(Enumeration<Object> e) { } |
|
16 |
||
17 |
static void g() { |
|
18 |
new G3(new Enumeration() { |
|
19 |
public boolean hasMoreElements() { return false; } |
|
20 |
public Object nextElement() { return null; } |
|
21 |
}); |
|
22 |
} |
|
23 |
||
24 |
} |