langtools/test/tools/javac/generics/diamond/6996914/T6996914b.java
changeset 8635 383a416a2bdf
parent 7208 5db8147393ec
child 29776 984a79b71cfe
equal deleted inserted replaced
8634:222829aedfe4 8635:383a416a2bdf
     1 /*
     1 /*
     2  * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    21  * questions.
    21  * questions.
    22  */
    22  */
    23 
    23 
    24 /*
    24 /*
    25  * @test
    25  * @test
    26  * @bug 6996914
    26  * @bug 6996914 7020044
    27  * @summary  Diamond inference: problem when accessing protected constructor
    27  * @summary  Diamond inference: problem when accessing protected constructor
    28  * @compile T6996914b.java
    28  * @compile T6996914b.java
    29  */
    29  */
    30 
    30 
    31 class Super<X,Y> {
    31 class Super<X,Y> {
    33     public Super(Number n, X x, Y y) {}
    33     public Super(Number n, X x, Y y) {}
    34 }
    34 }
    35 
    35 
    36 class Test {
    36 class Test {
    37     Super<String,Integer> ssi1 = new Super<>(1, "", 2);
    37     Super<String,Integer> ssi1 = new Super<>(1, "", 2);
    38     Super<String,Integer> ssi2 = new Super<>(1, "", 2) {};
       
    39 }
    38 }