flatbuffers
flatbuffers copied to clipboard
[Go] Fix GenNativeUnionUnPack for imported union type.
Consider the following fbs definitions:
package/type.fbs
namespace root.package;
table Type {}
union.fbs
include "./package/type.fbs";
namespace root;
union Union {
package.Type,
}
One would expect it to work fluently with --go --gen-all --gen-object-api. However, the generated codes won't compile due to accessing private fields defined in another package. This PR fixes this issue.
@dbaileychess Yep, I just noticed that I've forgotten to update the generated results. The commit https://github.com/google/flatbuffers/pull/7579/commits/69600e3200964227156981cf0c02facf568e8518 should be enough to show the modifications.