@@ -1150,7 +1150,7 @@ static const char* kRepeatedFieldArrayName = "repeatedFields_";
1150
1150
std::string RepeatedFieldsArrayName (const GeneratorOptions& options,
1151
1151
const Descriptor* desc) {
1152
1152
return HasRepeatedFields (options, desc)
1153
- ? (GetMessagePath (options, desc) + " ." + kRepeatedFieldArrayName )
1153
+ ? (desc-> name ( ) + " ." + kRepeatedFieldArrayName )
1154
1154
: " null" ;
1155
1155
}
1156
1156
@@ -2873,7 +2873,7 @@ const char * methodEndBrace = options.WantEs6() ? "}" : "};";
2873
2873
" \n " );
2874
2874
2875
2875
if (field->is_repeated ()) {
2876
- GenerateRepeatedMessageHelperMethods (options, printer, field);
2876
+ GenerateRepeatedMessageHelperMethods (options, type_names, printer, field);
2877
2877
}
2878
2878
2879
2879
} else {
@@ -3177,7 +3177,7 @@ void Generator::GenerateRepeatedPrimitiveHelperMethods(
3177
3177
}
3178
3178
3179
3179
void Generator::GenerateRepeatedMessageHelperMethods (
3180
- const GeneratorOptions& options, io::Printer* printer,
3180
+ const GeneratorOptions& options, const TypeNames& type_names, io::Printer* printer,
3181
3181
const FieldDescriptor* field) const {
3182
3182
3183
3183
const std::string classSymbol = GetMessagePath (options, field->containing_type ());
@@ -3202,13 +3202,13 @@ void Generator::GenerateRepeatedMessageHelperMethods(
3202
3202
3203
3203
printer->Annotate (" addername" , field);
3204
3204
printer->Print (
3205
- " this, $index$$oneofgroup$, opt_value, $ctor $, opt_index);\n "
3205
+ " this, $index$$oneofgroup$, opt_value, $class $, opt_index);\n "
3206
3206
" };\n "
3207
3207
" \n "
3208
3208
" \n " ,
3209
3209
" index" , JSFieldIndex (field), " oneofgroup" ,
3210
- (InRealOneof (field) ? (" , " + JSOneofArray (options, field)) : " " ), " ctor " ,
3211
- GetMessagePath (options, field-> message_type () ));
3210
+ (InRealOneof (field) ? (" , " + JSOneofArray (options, field)) : " " ), " class " ,
3211
+ type_names. SubmessageTypeRef ( field));
3212
3212
}
3213
3213
3214
3214
void Generator::GenerateClassExtensionFieldInfo (const GeneratorOptions& options,
0 commit comments