Fix multiple oneofs in same message (issue #229)
[apps/agl-service-can-low-level.git] / tests / options / options.proto
index b705041..89bb086 100644 (file)
@@ -2,6 +2,8 @@
  * options.expected lists the patterns that are searched for in the output.
  */
 
+syntax = "proto2";
+
 import "nanopb.proto";
 
 // File level options
@@ -87,3 +89,9 @@ message OneofMessage
     }
 }
 
+// Proto3-style optional field in proto2 file
+message Proto3Field
+{
+    optional int32 proto3field = 1 [(nanopb).proto3 = true];
+}
+