forked from 4hopp/proto2cpp
-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
bugProblems in the build system, build scripts, etc or faults in the interface.Problems in the build system, build scripts, etc or faults in the interface.
Description
Example
Input
syntax = "proto3";
package test;
message SubType {
enum Type {
TYPE_1 = 0;
TYPE_2 = 1;
}
Type field_1 = 1;
uint64 field_2 = 2;
oneof OneOfField {
int32 field_3 = 3;
double field_6 = 6;
}
}
Output
syntax = "proto3";
namespace test {
struct SubType {
enum Type {
TYPE_1 = 0,
TYPE_2 = 1,
};
Type field_1 = 1;
uint64 field_2 = 2;
oneof OneOfField {
int32 field_3 = 3;
double field_6 = 6;
};
};
}
In documentation, one would expect that field_3 could be referenced as test::SubType::field_3 or test::SubType::OneOfField::field_3. However, the field is not accessible as oneof is not a C++ type.
Once the style is chosen (i.e, test::SubType3::field_3 or test::SubType3::OneOfField::field_3) the fix is relatively simple.
Metadata
Metadata
Assignees
Labels
bugProblems in the build system, build scripts, etc or faults in the interface.Problems in the build system, build scripts, etc or faults in the interface.