Update Kotlin compiler to escape package names (#13310)
The current Kotlin code generator creates code which fails to compile with imports like:
```
syntax = "proto3";
package net.example.v1;
message Sample {
string net = 1;
}
```
This results in a condition where 'net' is ambiguous in some cases (could refer to the field or the package). To avoid these issues, the code generator should enclose package paths in backticks:
```
net.example.v1.SampleKt => `net.example.v1`.SampleKt
```
Fixes #13182.
Closes #13310
COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/13310 from pkwarren:pkw/issue-13182 3f72b2f1e1
PiperOrigin-RevId: 564481691
pull/14039/head
parent
dfc8445c72
commit
437ec356fb
4 changed files with 20 additions and 5 deletions
Loading…
Reference in new issue