diff options
author | Bryan Furia <52169145+BFuria@users.noreply.github.com> | 2019-06-24 14:46:00 -0400 |
---|---|---|
committer | Wouter van Oortmerssen <aardappel@gmail.com> | 2019-06-24 11:46:00 -0700 |
commit | 9fb195cce81028dd9c199f400b3dbdaade71d5d8 (patch) | |
tree | 5156279453384df68345644f3ad41c41c4483363 /src | |
parent | 7836e65dd4310fc7a4c1f60d7adf3f5e2d736aa1 (diff) | |
download | flatbuffers-9fb195cce81028dd9c199f400b3dbdaade71d5d8.tar.gz flatbuffers-9fb195cce81028dd9c199f400b3dbdaade71d5d8.tar.bz2 flatbuffers-9fb195cce81028dd9c199f400b3dbdaade71d5d8.zip |
Fix generating nested Flatbuffer accessors when they cross namespaces (#5414)
Diffstat (limited to 'src')
-rw-r--r-- | src/idl_parser.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/idl_parser.cpp b/src/idl_parser.cpp index 6ae5c433..ea289143 100644 --- a/src/idl_parser.cpp +++ b/src/idl_parser.cpp @@ -843,12 +843,7 @@ CheckedError Parser::ParseField(StructDef &struct_def) { "nested_flatbuffer attribute may only apply to a vector of ubyte"); // This will cause an error if the root type of the nested flatbuffer // wasn't defined elsewhere. - LookupCreateStruct(nested->constant); - - // Keep a pointer to StructDef in FieldDef to simplify re-use later - auto nested_qualified_name = - current_namespace_->GetFullyQualifiedName(nested->constant); - field->nested_flatbuffer = LookupStruct(nested_qualified_name); + field->nested_flatbuffer = LookupCreateStruct(nested->constant); } if (field->attributes.Lookup("flexbuffer")) { |