mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-02 12:05:50 +00:00
Support --conform for vector of unions (#6883)
It seems like `--conform` already works for vectors of unions - there is just a spurious check that prevents it from running. Fixes #6882 Also, if schemas do not conform, `flatc` no longer prints out the usage (since the error is not due to bad usage). Fixes #6496
This commit is contained in:
@@ -519,7 +519,7 @@ int FlatCompiler::Compile(int argc, const char **argv) {
|
||||
}
|
||||
if ((is_schema || is_binary_schema) && !conform_to_schema.empty()) {
|
||||
auto err = parser->ConformTo(conform_parser);
|
||||
if (!err.empty()) Error("schemas don\'t conform: " + err);
|
||||
if (!err.empty()) Error("schemas don\'t conform: " + err, false);
|
||||
}
|
||||
if (schema_binary || opts.binary_schema_gen_embed) {
|
||||
parser->Serialize();
|
||||
|
||||
Reference in New Issue
Block a user