kythe.io@v0.0.68-0.20240422202219-7225dbc01741/kythe/cxx/indexer/proto/testdata/basic/default-value.proto (about)

     1  syntax = "proto2";
     2  
     3  package proto_kythe_test;
     4  option java_package = "io.kythe";
     5  
     6  message M {
     7    //- @E defines/binding NodeE
     8    enum E {
     9      //- @V1 defines/binding NodeV1
    10      //- NodeV1 childof NodeE
    11      V1 = 1;
    12      V2 = 3;
    13    }
    14    //- @E ref NodeE
    15    //- @V1 ref NodeV1
    16    optional E f = 1 [default = V1];
    17  
    18    // This is used to test that we properly link the named default value of
    19    // an enum type to its named declaration.
    20  }