mirror of
https://github.com/netbirdio/gomobile-tvos-fork.git
synced 2026-05-22 18:43:29 -07:00
bind: support types with the same title name as their packages
If a Go struct or interface has the same name as its package class, append an underscore to the generated Java class name. Fixes golang/go#23327. Change-Id: Ib680af35c956801073a0effb510a3ed9bbb8b9d1 Reviewed-on: https://go-review.googlesource.com/87656 Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
This commit is contained in:
@@ -588,4 +588,13 @@ public class SeqTest extends InstrumentationTestCase {
|
||||
public void testTags() {
|
||||
assertEquals("Constant from a tagged file", 42, Testpkg.TaggedConst);
|
||||
}
|
||||
|
||||
public void testClassNameWithPackageName() {
|
||||
testpkg.Testpkg_ o = new secondpkg.Secondpkg_();
|
||||
secondpkg.Secondpkg_ o2 = Secondpkg.newSecondpkg();
|
||||
o2.m();
|
||||
o2.setV("hi");
|
||||
assertEquals(o2.getV(), "hi");
|
||||
Testpkg.clashingParameterFromOtherPackage(o2);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user