// Exercises the ordering of synthetic map entry types relative to
// concrete nested message/enum declarations. Synthetic map entries must
// appear at their originating map field's source position to match protoc.

//% descriptor: true
syntax = "proto3";

package test;

message MapBeforeNested {
    map<string, string> my_map = 1;
    message Nested {}
}

message NestedBeforeMap {
    message Nested {}
    map<string, string> my_map = 1;
}

message Interleaved {
    message A {}
    map<string, string> m1 = 1;
    message B {}
    map<int32, string> m2 = 2;
    enum E { E_ZERO = 0; }
    message C {}
    map<string, int32> m3 = 3;
}
