This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Java: Fix for PR 4695


Bryce McKinlay <bryce@waitaki.otago.ac.nz> writes:

> OK to commit?

As I was mechanically testing the patch, I detected a regression:

class y {}
class Z {
  public Z () {
    this(new y() {});
  }
  public Z (y _) {}
}

The patched compiler reports:

  Z.java: In class `Z':
  Z.java: In constructor `()':
  Z.java:4: Can't reference `this' before the superclass constructor has been called.
         this(new y() {});
                  ^
  1 error

I haven't had a chance to look into it yet.

./A



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]