From c42df9cad0a192f241f5e9c52462b8b30fff70dd Mon Sep 17 00:00:00 2001 From: Alexey Edelev Date: Fri, 4 Oct 2024 11:51:52 +0200 Subject: [PATCH] Add the map name clashing syntax test Protoc disallows using the Entry if the respective map field is defined. But meanwhile it allows using _Entry as the field name, which ends up as Entry in the generated code. The difference is in the letter case is used for the alias we add for map entries and the actual field name. As the conclusion - test passes, but we should keep it in our test suite to ensure we compliant with the protoc rules. Pick-to: 6.8 6.9 Change-Id: I8a8d6796b6c5564b211bd11fdd23102b0031031e Reviewed-by: Dennis Oberst --- tests/auto/shared/data/proto/syntax.proto | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/auto/shared/data/proto/syntax.proto b/tests/auto/shared/data/proto/syntax.proto index a1fcd3ab..19556194 100644 --- a/tests/auto/shared/data/proto/syntax.proto +++ b/tests/auto/shared/data/proto/syntax.proto @@ -138,3 +138,9 @@ message NameClashingRepeated { message NameClashing_Repeated { } + +message NameClashingMap { + map field1 = 1; + int32 Field1_Entry = 2; + int32 Field2Entry = 3; +}