Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/mobile: If there is a private method in interface, it fails to generate IOS codes. (gobind) #57682

Open
taeguk opened this issue Jan 8, 2023 · 1 comment
Labels
mobile Android, iOS, and x/mobile NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@taeguk
Copy link

taeguk commented Jan 8, 2023

If there is a private method in interface, it fails to generate methods whose return two results. (gobind)

Example code

type Test interface {
	A() string // OK!
	B() (string, error) // Error!

	c()
}

Error message

$ gomobile bind -target=ios -o "dist/RektEngine.xcframework" "github.com/justx-inc/rekt-engine/sdk/engine"

gomobile: iossimulator/amd64: go build -buildmode=c-archive -o /var/folders/kg/m9tfxgnj5zqgmr6pq5ttmqy00000gn/T/gomobile-work-1509676306/RektEngine-iossimulator-amd64.a ./gobind failed: exit status 2
# gobind/gobind
Engine_darwin.m:1883:35: error: incomplete result type 'struct cproxyengine_Test_B_return' in function definition
Engine_darwin.m:1883:8: note: forward declaration of 'struct cproxyengine_Test_B_return'
Engine_darwin.m:1901:3: error: must use 'struct' tag to refer to type 'cproxyengine_Test_B_return'
Engine_darwin.m:1901:30: error: variable has incomplete type 'struct cproxyengine_Test_B_return'
Engine_darwin.m:1883:8: note: forward declaration of 'struct cproxyengine_Test_B_return'
@gopherbot gopherbot added the mobile Android, iOS, and x/mobile label Jan 8, 2023
@gopherbot gopherbot added this to the Unreleased milestone Jan 8, 2023
@cherrymui
Copy link
Member

cc @hyangah @golang/ios @golang/android

@cherrymui cherrymui added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jan 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mobile Android, iOS, and x/mobile NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

3 participants