8db2f8de59
Implementation of MethodSymbol.location() should take into account static/instance initializers Reviewed-by: jjg
33 lines
559 B
Java
33 lines
559 B
Java
/*
|
|
* @test /nodynamiccopyright/
|
|
* @bug 7086595
|
|
* @summary Error message bug: name of initializer is 'null'
|
|
* @compile/fail/ref=T7086595.out -XDrawDiagnostics T7086595.java
|
|
*/
|
|
|
|
class T7086595 {
|
|
|
|
String s = "x";
|
|
String s = nonExistent;
|
|
|
|
int foo() {
|
|
String s = "x";
|
|
String s = nonExistent;
|
|
}
|
|
|
|
static int bar() {
|
|
String s = "x";
|
|
String s = nonExistent;
|
|
}
|
|
|
|
{
|
|
String s = "x";
|
|
String s = nonExistent;
|
|
}
|
|
|
|
static {
|
|
String s = "x";
|
|
String s = nonExistent;
|
|
}
|
|
}
|