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/bind: unsupported named type affects private fields in embedded structure #14016

Closed
ghost opened this issue Jan 19, 2016 · 1 comment

Comments

@ghost
Copy link

ghost commented Jan 19, 2016

As before we can have a private filed with unsupported named type, but in recently update(gomobile version +24a199a Wed Jan 13), it breaks this rule, that makes a huge impact to code, and make all types which want to be used for mobile narrows down to supported basic type....

Before:

The following type is working

type ABC struct {
WSClient
}

type WSClient struct {
conn *websocket.Conn
}

ABC is the struct exported for use in android.

After:
it is not working with an error message:
gomobile: unsupported named type xxxx

@ghost ghost changed the title x/mobile/mobile: unsupported named type affects private fields x/mobile/mobile: unsupported named type affects private fields in embedded structure Jan 19, 2016
@hyangah hyangah changed the title x/mobile/mobile: unsupported named type affects private fields in embedded structure x/mobile/bind: unsupported named type affects private fields in embedded structure Jan 21, 2016
@hyangah hyangah added this to the Unreleased milestone Jan 21, 2016
@hyangah hyangah self-assigned this Jan 21, 2016
@hyangah
Copy link
Contributor

hyangah commented Jan 21, 2016

It's because non-pointer struct type as a field is not yet supported.
I don't think it was ever working before but I may be wrong. Duplicate of #11318.

type ABC struct {
*WSClient
}

will work if you need a workaround :-(

@hyangah hyangah closed this as completed Jan 21, 2016
@golang golang locked and limited conversation to collaborators Jan 23, 2017
@rsc rsc unassigned hyangah Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants