-
Bug
-
Resolution: Won't Fix
-
P2
-
7
-
generic
-
generic
Please see the following test:
--------------------------------------------
public class A {
public void #"class"() {}
public void #"super"() {}
public void #"this"() {}
public static void main(String argv[]) {
A testClass = new A();
testClass.#"class"();
testClass.#"super"();
testClass.#"this"();
}
}
-----------------------------------------------
The attempt to compile it using JDK 7 b76 fails with the output:
-----------------------------------------------
A.java:8: cannot find symbol
testClass.#"class"();
^
symbol: class testClass
location: class A
A.java:9: call to super must be first statement in constructor
testClass.#"super"();
^
A.java:10: call to this must be first statement in constructor
testClass.#"this"();
^
3 errors
-----------------------------------------------
If these identifiers have special semantics it should be obviously mentioned in the specification.
--------------------------------------------
public class A {
public void #"class"() {}
public void #"super"() {}
public void #"this"() {}
public static void main(String argv[]) {
A testClass = new A();
testClass.#"class"();
testClass.#"super"();
testClass.#"this"();
}
}
-----------------------------------------------
The attempt to compile it using JDK 7 b76 fails with the output:
-----------------------------------------------
A.java:8: cannot find symbol
testClass.#"class"();
^
symbol: class testClass
location: class A
A.java:9: call to super must be first statement in constructor
testClass.#"super"();
^
A.java:10: call to this must be first statement in constructor
testClass.#"this"();
^
3 errors
-----------------------------------------------
If these identifiers have special semantics it should be obviously mentioned in the specification.