Fix cpp syntax error when the service method name is `request`. (#18174)

Issue #18173

Closes #18174

COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/18174 from liqipeng:main_fix_bug_method_name_is_request 502a4cdd44
PiperOrigin-RevId: 672951448
pull/18206/head
liqipeng 3 months ago committed by Copybara-Service
parent bd3629c6b9
commit 25e9631313
  1. 6
      src/google/protobuf/compiler/cpp/service.cc

@ -256,8 +256,10 @@ void ServiceGenerator::GenerateCallMethodCases(io::Printer* printer) {
}, },
R"cc( R"cc(
case $index$: case $index$:
$name$(controller, ::$proto_ns$::DownCastMessage<$input$>(request), this->$name$(controller,
::$proto_ns$::DownCastMessage<$output$>(response), done); ::$proto_ns$::DownCastMessage<$input$>(request),
::$proto_ns$::DownCastMessage<$output$>(response),
done);
break; break;
)cc"); )cc");
} }

Loading…
Cancel
Save