Add minimization for enum_type.

This won't have much effect over the edition zero migration, since enums in any proto2/proto3 file are either exclusively closed/open, respectively.  However, it will prefer enum-level features if there's only a single enum

PiperOrigin-RevId: 590642827
pull/15074/head
Mike Kruskal 12 months ago committed by Copybara-Service
parent 85a134bacd
commit 7c38dabce3
  1. 3
      src/google/protobuf/editions/golden/editions_transform_proto2.proto

@ -18,7 +18,6 @@ import "third_party/java_src/protobuf/current/java/com/google/protobuf/java_feat
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 = NONE;
option java_multiple_files = true;
@ -110,6 +109,8 @@ message TestMessage {
}
enum TestEnum {
option features.enum_type = CLOSED;
FOO = 1; // Non-zero default
BAR = 2;

Loading…
Cancel
Save