diff --git a/bind/java/SeqTest.java b/bind/java/SeqTest.java index e1020da..5308bd8 100644 --- a/bind/java/SeqTest.java +++ b/bind/java/SeqTest.java @@ -374,6 +374,10 @@ public class SeqTest extends AndroidTestCase { assertEquals("want Node A points to Node B", "A:B:", got); } + public void testImplementsInterface() { + Testpkg.Interface intf = Testpkg.NewConcrete(); + } + public void testErrorField() { final String want = "an error message"; Testpkg.Node n = Testpkg.NewNode("ErrTest"); diff --git a/bind/java/testpkg/testpkg.go b/bind/java/testpkg/testpkg.go index 7a051d1..a2ec48f 100644 --- a/bind/java/testpkg/testpkg.go +++ b/bind/java/testpkg/testpkg.go @@ -191,6 +191,21 @@ func GarbageCollect() { runtime.GC() } +type ( + Concrete struct{} + + Interface interface { + F() + } +) + +func (_ *Concrete) F() { +} + +func NewConcrete() *Concrete { + return new(Concrete) +} + func ReadAsset() string { rc, err := asset.Open("hello.txt") if err != nil {