mirror of
https://github.com/netbirdio/gomobile-tvos-fork.git
synced 2026-05-22 18:43:29 -07:00
bind: generate reverse bindings for implicit Java types
Before this CL, Java types that were only implicitly referenced
were represented as interface{}. However, if a value of such an
implicit type were passed to Java, a runtime crash would occur
because there would be no wrapper class to unwrap.
Fix this by generating implicit types, fixing the crashes,
gaining type safety, and removing the interface{} special case in
the generator.
While we're here, remove a redundant insert to the clsMap map in
java.go.
Change-Id: Ic50125da3d7cd6075899bf628d419b084c630490
Reviewed-on: https://go-review.googlesource.com/34777
Reviewed-by: David Crawshaw <crawshaw@golang.org>
This commit is contained in:
@@ -114,12 +114,6 @@ public class ClassesTest extends InstrumentationTestCase {
|
||||
assertEquals("IOException message", Javapkg.IOExceptionMessage, exc.getMessage());
|
||||
}
|
||||
|
||||
public void testUnknownType() {
|
||||
GoObject o = new GoObject();
|
||||
o.toString(); // Set this
|
||||
assertTrue("GoObject.getClass not null", o.checkClass());
|
||||
}
|
||||
|
||||
public void testInnerClass() {
|
||||
Character.Subset s = new Character.Subset(""){};
|
||||
Character.Subset s2 = new GoSubset("");
|
||||
|
||||
Reference in New Issue
Block a user