Skip to content

Commit 17d5954

Browse files
egormodindibenede
authored andcommitted
Fix has and clear methods (protocolbuffers#6)
1 parent 4710bef commit 17d5954

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

generator/js_generator.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2308,7 +2308,7 @@ void Generator::GenerateOneofCaseDefinition(
23082308
"() {\n"
23092309
" return /** @type {$class$.$oneof$Case} */(jspb.Message."
23102310
"computeOneofCase(this, $class$.oneofGroups_[$oneofindex$]));\n",
2311-
"class", className,
2311+
"class", oneof->containing_type()->name(),
23122312
"oneof", JSOneofName(oneof),
23132313
"oneofindex", JSOneofIndex(oneof));
23142314
GenerateMethodEnd(options, printer);
@@ -3108,7 +3108,7 @@ const char * methodEndBrace = options.WantEs6() ? "}" : "};";
31083108
if (HasFieldPresence(options, field)) {
31093109
const std::string haserName = "has" + JSGetterName(options, field);
31103110
const std::string haserMethodStart = MethodStart(
3111-
options, classSymbol.c_str(), clearerName.c_str());
3111+
options, classSymbol.c_str(), haserName.c_str());
31123112

31133113
printer->Print(
31143114
"/**\n"

0 commit comments

Comments
 (0)