diff options
author | Casper <casperneo@uchicago.edu> | 2020-10-19 13:16:00 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-19 13:16:00 -0700 |
commit | 8f6fa4b71549c9dd95565a839ff9817ec65b26a8 (patch) | |
tree | 6f3d1957b67dd016763d3a8aa90e3348f9294b87 /src/idl_parser.cpp | |
parent | b46db38f578ba96ec0d767d1d3a5071e365a6b19 (diff) | |
download | flatbuffers-8f6fa4b71549c9dd95565a839ff9817ec65b26a8.tar.gz flatbuffers-8f6fa4b71549c9dd95565a839ff9817ec65b26a8.tar.bz2 flatbuffers-8f6fa4b71549c9dd95565a839ff9817ec65b26a8.zip |
Updated SupportsAdvancedUnionFeatures to look out for string (#6190)
Co-authored-by: Casper Neo <cneo@google.com>
Diffstat (limited to 'src/idl_parser.cpp')
-rw-r--r-- | src/idl_parser.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/idl_parser.cpp b/src/idl_parser.cpp index d2c729a7..b9086840 100644 --- a/src/idl_parser.cpp +++ b/src/idl_parser.cpp @@ -2998,8 +2998,8 @@ CheckedError Parser::ParseRoot(const char *source, const char **include_paths, for (auto val_it = enum_def.Vals().begin(); val_it != enum_def.Vals().end(); ++val_it) { auto &val = **val_it; - if (!SupportsAdvancedUnionFeatures() && val.union_type.struct_def && - val.union_type.struct_def->fixed) + if (!SupportsAdvancedUnionFeatures() && + (IsStruct(val.union_type) || IsString(val.union_type))) return Error( "only tables can be union elements in the generated language: " + val.name); |