bind: preserve no-arg Java constructors

When the Java class parser began culling unused constructors, the
logic for determining whether a given Java class has a no-arg
constructor broke when the no-arg constructor is culled. Add
an explicit field for tracking the no-arg constructor property.

Change-Id: Ib68929ae1108bd6fa1fd23de1d134332eb0d97a2
Reviewed-on: https://go-review.googlesource.com/29875
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
This commit is contained in:
Elias Naur
2016-09-30 14:00:14 +00:00
parent 1663ffa95c
commit 2dcaa053a0
5 changed files with 37 additions and 15 deletions
+6
View File
@@ -75,6 +75,12 @@ public final class Object extends java.lang.Object implements Seq.GoObject {
private final Seq.Ref ref;
Object(Seq.Ref ref) { this.ref = ref; }
public Object() { this.ref = __New(); }
private static native Seq.Ref __New();
@Override public final int incRefnum() {
int refnum = ref.refnum;
Seq.incGoRef(refnum);