File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -681,8 +681,16 @@ void inl_gen::visit(const mfast::sequence_field_instruction *inst,
681681 for (std::size_t i = 0 ; i < inst->subinstructions ().size (); ++i) {
682682 const field_instruction *subinst = inst->subinstructions ()[i];
683683
684- out_ << " visitor.visit(" << get_ext_cref_type (subinst) << " ((*this)["
685- << i << " ]) );\n " ;
684+ if (is_group_type (subinst) && subinst->optional ())
685+ {
686+ out_ << " {\n "
687+ << " " << get_ext_cref_type (subinst) << " ext_cref_group((*this)[" << i << " ]);\n "
688+ << " ext_cref_group.set_group_present(this->field_storage(" << i << " )->is_present());\n "
689+ << " visitor.visit(ext_cref_group);\n "
690+ << " }\n " ;
691+ }
692+ else
693+ out_ << " visitor.visit(" << get_ext_cref_type (subinst) << " ((*this)[" << i << " ]) );\n " ;
686694 }
687695
688696 out_ << " }\n\n " ;
You can’t perform that action at this time.
0 commit comments