summaryrefslogtreecommitdiff
path: root/tests/monster_test.fbs
diff options
context:
space:
mode:
authorWouter van Oortmerssen <wvo@google.com>2016-06-17 18:16:11 -0700
committerWouter van Oortmerssen <wvo@google.com>2016-06-20 11:47:04 -0700
commit3639032d1e2224663202f79ca33c5039eed95f29 (patch)
tree1a22e00b573a8fd9003bd9f8f4a7a42ac43f60ba /tests/monster_test.fbs
parent6e177bf03f027880abfca69ebfda8e4d8b1d2da7 (diff)
downloadflatbuffers-3639032d1e2224663202f79ca33c5039eed95f29.tar.gz
flatbuffers-3639032d1e2224663202f79ca33c5039eed95f29.tar.bz2
flatbuffers-3639032d1e2224663202f79ca33c5039eed95f29.zip
Allow unions of table types with the same name but from different namespaces.
Also fixed most codegenerators using the wrong namespace when multiple namespace were used in a file, with some files not being generated. Change-Id: Ib42969221239d7244e431cbd667ef69200fc415f Tested: on Linux. Bug: 29338474
Diffstat (limited to 'tests/monster_test.fbs')
-rwxr-xr-xtests/monster_test.fbs6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/monster_test.fbs b/tests/monster_test.fbs
index 08e72d4a..7ddaa582 100755
--- a/tests/monster_test.fbs
+++ b/tests/monster_test.fbs
@@ -2,13 +2,17 @@
include "include_test1.fbs";
+namespace MyGame.Example2;
+
+table Monster {} // Test having same name as below, but in different namespace.
+
namespace MyGame.Example;
attribute "priority";
enum Color:byte (bit_flags) { Red = 0, Green, Blue = 3, }
-union Any { Monster, TestSimpleTableWithEnum } // TODO: add more elements
+union Any { Monster, TestSimpleTableWithEnum, MyGame.Example2.Monster }
struct Test { a:short; b:byte; }