syntax = "proto2";

package test;

message M {
    optional int32 y0 = 1;
    optional int32 y1 = 2;
    optional int32 y2 = 3;
    optional int32 y3 = 4;
    optional int32 y4 = 5;

    extensions 2, 3 to 3, 5 to max;
    reserved 7, 8 to 9;     // Overlapping reserved regions.
    extensions 10 to 20;    // Overlapping extensions.
    extensions max to max;  // Only first can be max.
}

enum E {
    extensions 1; // Not allowed.
    X = 0;
}