1 /*
2  * @test /nodynamiccopyright/
3  * @bug 4951260
4  * @summary compiler disallows raw call to generic constructor
5  * @author gafter
6  *
7  * @compile       -Werror                  UncheckedConstructor.java
8  * @compile/fail/ref=UncheckedConstructor.out -XDrawDiagnostics  -Werror -Xlint:unchecked UncheckedConstructor.java
9  */
10 
11 import java.util.*;
12 
13 class G3 {
14 
G3(Enumeration<Object> e)15     G3(Enumeration<Object> e) { }
16 
g()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 }
25