mirror of
https://github.com/google/flatbuffers.git
synced 2026-07-02 18:58:17 +00:00
Fix missing namespace qualifier in Pack() (#8967)
* Fix missing namespace qualifier in Pack() for cross-namespace table references * Fix missing namespace qualifier in Pack() * Add cross_namespace_pack_test to Bazel build
This commit is contained in:
18
tests/cross_namespace_pack_test.fbs
Normal file
18
tests/cross_namespace_pack_test.fbs
Normal file
@@ -0,0 +1,18 @@
|
||||
// Test for cross-namespace Pack() code generation (issue #8948).
|
||||
// Verifies that Create* calls in Pack() are properly namespace-qualified
|
||||
// when referencing tables from different namespaces.
|
||||
|
||||
namespace native;
|
||||
|
||||
table TableWithNative {
|
||||
value: int;
|
||||
}
|
||||
|
||||
namespace foo;
|
||||
|
||||
table Consumer {
|
||||
c1: native.TableWithNative;
|
||||
c2: [native.TableWithNative];
|
||||
}
|
||||
|
||||
root_type Consumer;
|
||||
Reference in New Issue
Block a user