-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Open
Labels
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.mobileAndroid, iOS, and x/mobileAndroid, iOS, and x/mobile
Milestone
Description
What version of Go are you using (go version
)?
$ go version go version go1.14.4 darwin/amd64
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env
)?
go env
Output
$ go env GOARCH="amd64" GOOS="darwin"
What did you do?
- Create a demo pkg at ~/go/src/demo
- Add ~/go/src/demo/model/model.go
package model type IntSet struct { }
- Add ~/go/src/demo/demo.go
package demo import "demo/model" type IntSet = model.IntSet func NewIntSet() *IntSet { return new(IntSet) }
- Generate bindings
gomobile bind -target=ios demo
What did you expect to see?
Generate bindings:
@class DemoIntSet;
@interface DemoIntSet ...
...
FOUNDATION_EXPORT DemoIntSet* _Nullable DemoNewIntSet(void);
What did you see instead?
@class DemoIntSet;
@interface DemoIntSet ...
...
// skipped function NewIntSet with unsupported parameter or return types
I guess gobind doesn't use demo.IntSet
as demo.NewIntSet
's return value type, still use model.IntSet
which is not exported.
To fix this issue, I have to define a new type like type IntSet model.IntSet
, in this way, it requires to rewrite all methods because now demo.IntSet
is a new type. This brings lots of work.
paulaolmedo and ehames
Metadata
Metadata
Assignees
Labels
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.mobileAndroid, iOS, and x/mobileAndroid, iOS, and x/mobile