Thu, 10 Oct 2013 14:58:04 +0200
8001931: The new build system whitespace cleanup
Reviewed-by: tbell, simonis, erikj
1 /*
2 * @test /nodynamiccopyright/
3 * @bug 8023545
4 * @summary Misleading error message when using diamond operator with private constructor
5 * @compile/fail/ref=MisleadingErrorMsgDiamondPlusPrivateCtorTest.out -XDrawDiagnostics MisleadingErrorMsgDiamondPlusPrivateCtorTest.java
6 */
8 public class MisleadingErrorMsgDiamondPlusPrivateCtorTest {
9 public void foo() {
10 MyClass<Object> foo = new MyClass<>();
11 }
12 }
14 class MyClass<E> {
15 private MyClass() {}
16 }