retitle 141900 [fixed in gcj-3.1] compile breaks using temporary inner class instance reassign 141900 gcj-3.0 tags 141900 + fixed thanks
Ben Burton writes: > Package: gcj > Version: 2:3.0.4-5 > Severity: normal > > Hi. I'm getting a gcj compile error when calling a member function of a > newly created instance of an inner class. > > Try compiling the following chunk of code: > > class Test { > public static void main(String[] args) { > (new InnerTest()).act(); > } > > static public class InnerTest { > public InnerTest() { > } > > public void act() { > System.out.println("Hi!"); > } > } > } > > [EMAIL PROTECTED]:/tmp> gcj -C Test.java > Test.java: In class `Test': > Test.java: In method `Test.main(java.lang.String[])': > Test.java:6: No enclosing instance for inner class `' is in scope. > (new InnerTest()).act(); > ^ > 1 error -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]