Open
Description
We had a particular case where Objective-C would have needed a forward declaration when building the following Go snippets as Objective-C:
type BuilderOptionContext interface {
// public API
// (omitted for brevity)
// private API
getOptions() *[]BuilderOption
}
type BuilderOption interface {
Option() BuilderOptionType
Apply(builder BuilderOptionContext) error
}
It was easier enough to work around but there was no indication from gomobile what the problem was. The native build failed reporting a type was expected at line/column but no more detail than that. It was only after I commented out the cleanup in cmd/gomobile/bind/go
that I could see the generated source and work out what was happening... perhaps we're missing a flag to prevent cleanup on failure?
Granted this was a code smell and we don't put any private API on that public interface now, but it was interesting nevertheless.