Skip to content

Commit ab9efaa

Browse files
committed
protogen: fix name mangling for fields with identical GoCamelCase
This turns the nameclash testprotos ending in 3 into .proto files which use syntax = "proto3". Prior to the Opaque API release, we changed these .proto files to use editions, but using editions with proto3 semantics is not exactly the same as using proto3, so we need these .proto files to use syntax = "proto3"; Fixes golang/protobuf#1675 Change-Id: I0ebb37d4e1bf0fc830bbe613148429ec6ff5c46d Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/644437 Reviewed-by: Chressie Himpel <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
1 parent e677ef9 commit ab9efaa

File tree

16 files changed

+1215
-293
lines changed

16 files changed

+1215
-293
lines changed

cmd/protoc-gen-go/testdata/nameclash/test_name_clash_hybrid.proto

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,3 +331,9 @@ message M20 {
331331
int32 which_which_foo = 2;
332332
}
333333
}
334+
335+
message M21 {
336+
string _foo = 1;
337+
string X_foo = 2;
338+
string get_x_foo = 3;
339+
}

cmd/protoc-gen-go/testdata/nameclash/test_name_clash_hybrid/test_name_clash_hybrid.pb.go

Lines changed: 149 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmd/protoc-gen-go/testdata/nameclash/test_name_clash_hybrid/test_name_clash_hybrid_protoopaque.pb.go

Lines changed: 160 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)