Skip to content

Commit e205073

Browse files
committed
grpc-pb: Address PR comments
Signed-off-by: Johannes Zottele <[email protected]>
1 parent 39403d0 commit e205073

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

grpc/grpc-core/src/commonTest/proto/nested.proto

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
// Protocol Buffers - Google's data interchange format
2-
// Copyright 2023 Google LLC. All rights reserved.
3-
//
4-
// Use of this source code is governed by a BSD-style
5-
// license that can be found in the LICENSE file or at
6-
// https://developers.google.com/open-source/licenses/bsd
7-
81
syntax = "proto2";
92

103
package test.nested;

protoc-gen/src/main/kotlin/kotlinx/rpc/protobuf/ModelToKotlinCommonGenerator.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ class ModelToKotlinCommonGenerator(
315315
lvalue = "field.value",
316316
beforeValueDecoding = {
317317
beforeValueDecoding()
318-
scope("val field = ($lvalue as? $variantName) ?: $variantName(${variant.type.internalCtor()}).also") {
318+
scope("val field = ($lvalue as? $variantName) ?: $variantName(${variant.type.internalConstructor()}).also") {
319319
// write the constructed oneof variant to the field
320320
code("$lvalue = it")
321321
}
@@ -870,7 +870,7 @@ class ModelToKotlinCommonGenerator(
870870
}
871871
}
872872

873-
private fun FieldType.Message.internalCtor() =
873+
private fun FieldType.Message.internalConstructor() =
874874
dec.value.internalClassFullName() + "()"
875875

876876
private fun MessageDeclaration.internalClassFullName(): String {

0 commit comments

Comments
 (0)