This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug java/20659] New: gcj: Can't reference 'this' before the superclass constructor
- From: "ovidr at users dot sourceforge dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Mar 2005 21:15:04 -0000
- Subject: [Bug java/20659] New: gcj: Can't reference 'this' before the superclass constructor
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
gcc version 4.0.0 20041213
javac Bla.java works.
gcj -C Bla.java (or -c)
Bla.java: In class 'Bla$B':
Bla.java: In constructor '(Bla)':
Bla.java:18: error: Can't reference 'this' before the superclass constructor
has been called.
super(doit());
^
1 error
------------------------------
public class Bla {
protected int doit() {
return 1;
}
public class A {
public A(int i) {
}
}
public class B extends A {
public B() {
super(doit());
}
}
}
--
Summary: gcj: Can't reference 'this' before the superclass
constructor
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: java
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ovidr at users dot sourceforge dot net
CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20659