aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/map_unittest.proto
diff options
context:
space:
mode:
Diffstat (limited to 'src/google/protobuf/map_unittest.proto')
-rw-r--r--src/google/protobuf/map_unittest.proto16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/google/protobuf/map_unittest.proto b/src/google/protobuf/map_unittest.proto
index b6a988b3..cbf747d9 100644
--- a/src/google/protobuf/map_unittest.proto
+++ b/src/google/protobuf/map_unittest.proto
@@ -62,7 +62,7 @@ message TestMap {
}
message TestMapSubmessage {
- optional TestMap test_map = 1;
+ TestMap test_map = 1;
}
message TestMessageMap {
@@ -104,3 +104,17 @@ message TestArenaMap {
map<int32 , MapEnum > map_int32_enum = 14;
map<int32 , ForeignMessage> map_int32_foreign_message = 15;
}
+
+// Previously, message containing enum called Type cannot be used as value of
+// map field.
+message MessageContainingEnumCalledType {
+ enum Type {
+ TYPE_FOO = 0;
+ }
+ map<int32, MessageContainingEnumCalledType> type = 1;
+}
+
+// Previously, message cannot contain map field called "entry".
+message MessageContainingMapCalledEntry {
+ map<int32, int32> entry = 1;
+}