Skip to content

Commit 885b9cd

Browse files
authored
Fix has and clear methods (#6)
1 parent dc42c5a commit 885b9cd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

generator/js_generator.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -2302,7 +2302,7 @@ void Generator::GenerateOneofCaseDefinition(
23022302
"() {\n"
23032303
" return /** @type {$class$.$oneof$Case} */(jspb.Message."
23042304
"computeOneofCase(this, $class$.oneofGroups_[$oneofindex$]));\n",
2305-
"class", className,
2305+
"class", oneof->containing_type()->name(),
23062306
"oneof", JSOneofName(oneof),
23072307
"oneofindex", JSOneofIndex(oneof));
23082308
GenerateMethodEnd(options, printer);
@@ -3109,7 +3109,7 @@ const char * methodEndBrace = options.WantEs6() ? "}" : "};";
31093109
if (HasFieldPresence(options, field)) {
31103110
const std::string haserName = "has" + JSGetterName(options, field);
31113111
const std::string haserMethodStart = MethodStart(
3112-
options, classSymbol.c_str(), clearerName.c_str());
3112+
options, classSymbol.c_str(), haserName.c_str());
31133113

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

0 commit comments

Comments
 (0)