From d35c590644faef13684cd002164e1a4f3a20b1f4 Mon Sep 17 00:00:00 2001 From: jochen Date: Sat, 26 Jun 1999 16:12:28 +0000 Subject: [PATCH] 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 --- jode/test/AnonymousJavac.java | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/jode/test/AnonymousJavac.java b/jode/test/AnonymousJavac.java index 36f7f37..cb6ab69 100644 --- a/jode/test/AnonymousJavac.java +++ b/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() {