block initializer and even more brutal tests added

git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@898 379699f6-c40d-0410-875b-85095c16579e
stable
jochen 25 years ago
parent 693067c72a
commit d35c590644
  1. 21
      jode/test/AnonymousJavac.java

@ -31,6 +31,10 @@ public class AnonymousJavac {
class Hello {
int var = (int) longVar;
{
System.err.println("all constructors");
}
Hello() {
System.err.println("construct");
}
@ -38,6 +42,13 @@ public class AnonymousJavac {
System.err.println("construct: "+info);
}
// Hello(int i) {
// this("If you find a compiler that can compile this,"
// +" please comment this out and tell me if "
// +"decompilation works.\n"
// +"jikes 0.47, javac 1.2 are both broken!");
// }
public void hello() {
this.hashCode();
Inner.this.hashCode();
@ -51,6 +62,11 @@ public class AnonymousJavac {
final Object o = new Object() {
int blah = 5;
Hello hii = hi;
Hello hoo = new Hello("hoo");
{
System.err.println("Anonymous Constructor speaking");
}
public String toString() {
this.hii.hello();
@ -58,6 +74,11 @@ public class AnonymousJavac {
return Integer.toHexString(AnonymousJavac.this.hashCode()
+blah);
}
{
System.err.println("Anonymous Constructor continues");
}
};
Object p = new Object() {
public String toString() {

Loading…
Cancel
Save