|
|
|
@ -14,6 +14,10 @@ edition = "2023"; |
|
|
|
|
|
|
|
|
|
package protobuf_editions_test; |
|
|
|
|
|
|
|
|
|
import "third_party/java_src/protobuf/current/java/com/google/protobuf/java_features.proto"; |
|
|
|
|
import "google/protobuf/cpp_features.proto"; |
|
|
|
|
import "google/protobuf/editions/proto/editions_transform_proto3.proto"; |
|
|
|
|
|
|
|
|
|
option features.enum_type = CLOSED; |
|
|
|
|
option features.repeated_field_encoding = EXPANDED; |
|
|
|
|
option features.utf8_validation = UNVERIFIED; |
|
|
|
@ -113,3 +117,12 @@ enum TestEnum { |
|
|
|
|
BAZ = 3; |
|
|
|
|
NEG = -1; // Intentionally negative. |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
message TestOpenEnumMessage { |
|
|
|
|
TestEnumProto3 open_enum_field = 1 [ |
|
|
|
|
features.(pb.cpp).legacy_closed_enum = true, |
|
|
|
|
features.(pb.java).legacy_closed_enum = true |
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
TestEnum closed_enum_field = 2; |
|
|
|
|
} |
|
|
|
|