Prohibit unverified lazy repeated fields.

They are a no-op in protoc.

PiperOrigin-RevId: 608746776
pull/15879/head
Chris Kennelly 1 year ago committed by Copybara-Service
parent dd87c9fc72
commit bcb1d8cfbd
  1. 2
      src/google/protobuf/compiler/cpp/field.cc

@ -272,6 +272,8 @@ std::unique_ptr<FieldGeneratorBase> MakeGenerator(const FieldDescriptor* field,
return MakeMapGenerator(field, options, scc);
}
if (field->is_repeated()) {
ABSL_CHECK(!field->options().unverified_lazy());
switch (field->cpp_type()) {
case FieldDescriptor::CPPTYPE_MESSAGE:
return MakeRepeatedMessageGenerator(field, options, scc);

Loading…
Cancel
Save