author | ysuenaga |
Wed, 30 Mar 2016 21:05:13 +0900 | |
changeset 37218 | c7241bc368bf |
parent 19917 | ebb957ba7b07 |
permissions | -rw-r--r-- |
19917
ebb957ba7b07
8023545: Misleading error message when using diamond operator with private constructor
vromero
parents:
diff
changeset
|
1 |
/* |
ebb957ba7b07
8023545: Misleading error message when using diamond operator with private constructor
vromero
parents:
diff
changeset
|
2 |
* @test /nodynamiccopyright/ |
ebb957ba7b07
8023545: Misleading error message when using diamond operator with private constructor
vromero
parents:
diff
changeset
|
3 |
* @bug 8023545 |
ebb957ba7b07
8023545: Misleading error message when using diamond operator with private constructor
vromero
parents:
diff
changeset
|
4 |
* @summary Misleading error message when using diamond operator with private constructor |
ebb957ba7b07
8023545: Misleading error message when using diamond operator with private constructor
vromero
parents:
diff
changeset
|
5 |
* @compile/fail/ref=MisleadingErrorMsgDiamondPlusPrivateCtorTest.out -XDrawDiagnostics MisleadingErrorMsgDiamondPlusPrivateCtorTest.java |
ebb957ba7b07
8023545: Misleading error message when using diamond operator with private constructor
vromero
parents:
diff
changeset
|
6 |
*/ |
ebb957ba7b07
8023545: Misleading error message when using diamond operator with private constructor
vromero
parents:
diff
changeset
|
7 |
|
ebb957ba7b07
8023545: Misleading error message when using diamond operator with private constructor
vromero
parents:
diff
changeset
|
8 |
public class MisleadingErrorMsgDiamondPlusPrivateCtorTest { |
ebb957ba7b07
8023545: Misleading error message when using diamond operator with private constructor
vromero
parents:
diff
changeset
|
9 |
public void foo() { |
ebb957ba7b07
8023545: Misleading error message when using diamond operator with private constructor
vromero
parents:
diff
changeset
|
10 |
MyClass<Object> foo = new MyClass<>(); |
ebb957ba7b07
8023545: Misleading error message when using diamond operator with private constructor
vromero
parents:
diff
changeset
|
11 |
} |
ebb957ba7b07
8023545: Misleading error message when using diamond operator with private constructor
vromero
parents:
diff
changeset
|
12 |
} |
ebb957ba7b07
8023545: Misleading error message when using diamond operator with private constructor
vromero
parents:
diff
changeset
|
13 |
|
ebb957ba7b07
8023545: Misleading error message when using diamond operator with private constructor
vromero
parents:
diff
changeset
|
14 |
class MyClass<E> { |
ebb957ba7b07
8023545: Misleading error message when using diamond operator with private constructor
vromero
parents:
diff
changeset
|
15 |
private MyClass() {} |
ebb957ba7b07
8023545: Misleading error message when using diamond operator with private constructor
vromero
parents:
diff
changeset
|
16 |
} |