mirror of
https://github.com/netbirdio/gomobile-tvos-fork.git
synced 2026-05-22 18:43:29 -07:00
bind: fix field accessors for Go implemented Java classes
The go_seq_to_refnum function handles its argument object as a Java object if it doesn't implement Seq.Proxy. Java classes implemented in Go does not implement Seq.Proxy, but when passing "this" references to Go, instances must be treated as a Go object. Use go_seq_to_refnum_go everywhere "this" is passed to Go, which fixes field accessors and simplifies the method call case. Change-Id: I3d01c63d7b2081e6344ece431f5e5021a9dd7662 Reviewed-on: https://go-review.googlesource.com/31171 Reviewed-by: David Crawshaw <crawshaw@golang.org>
This commit is contained in:
@@ -71,6 +71,11 @@ public class ClassesTest extends InstrumentationTestCase {
|
||||
assertNotNull("RuntimeException", exc);
|
||||
}
|
||||
|
||||
public void testField() {
|
||||
GoRunnable r = new GoRunnable();
|
||||
String f = r.getField();
|
||||
}
|
||||
|
||||
public void testGoObject() {
|
||||
Runnable r = new GoRunnable();
|
||||
r.run();
|
||||
|
||||
Reference in New Issue
Block a user