fix parser string=null (#6810)

Co-authored-by: Casper Neo <cneo@google.com>
This commit is contained in:
Casper
2021-08-24 09:41:39 -04:00
committed by GitHub
parent f89e0b1a6c
commit 4b9123baff
2 changed files with 2 additions and 2 deletions

View File

@@ -812,8 +812,7 @@ CheckedError Parser::ParseField(StructDef &struct_def) {
"or in structs.");
if (IsString(type) || IsVector(type)) {
advanced_features_ |= reflection::DefaultVectorsAndStrings;
if (field->value.constant != "0" && field->value.constant != "null" &&
!SupportsDefaultVectorsAndStrings()) {
if (field->value.constant != "0" && !SupportsDefaultVectorsAndStrings()) {
return Error(
"Default values for strings and vectors are not supported in one "
"of the specified programming languages");