|
|
|
@ -1357,7 +1357,7 @@ void ImmutableMessageGenerator::GenerateKotlinOrNull(io::Printer* printer) const |
|
|
|
|
const FieldDescriptor* field = descriptor_->field(i); |
|
|
|
|
if (field->has_presence() && GetJavaType(field) == JAVATYPE_MESSAGE) { |
|
|
|
|
printer->Print( |
|
|
|
|
"val $full_classname$OrBuilder.$camelcase_name$OrNull: $full_name$?\n" |
|
|
|
|
"public val $full_classname$OrBuilder.$camelcase_name$OrNull: $full_name$?\n" |
|
|
|
|
" get() = if (has$name$()) get$name$() else null\n\n", |
|
|
|
|
"full_classname", name_resolver_->GetClassName(descriptor_, true), |
|
|
|
|
"camelcase_name", context_->GetFieldGeneratorInfo(field)->name, |
|
|
|
|