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:
Alec Theriault
2021-11-01 14:26:36 -04:00
committed by GitHub
parent 8433eb108c
commit c0394bb09c
2 changed files with 3 additions and 4 deletions

View File

@@ -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();