File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,8 @@ var ReflectionObject = require("./object");
66( ( Namespace . prototype = Object . create ( ReflectionObject . prototype ) ) . constructor = Namespace ) . className = "Namespace" ;
77
88var Field = require ( "./field" ) ,
9- util = require ( "./util" ) ;
9+ util = require ( "./util" ) ,
10+ OneOf = require ( "./oneof" ) ;
1011
1112var Type , // cyclic
1213 Service ,
@@ -217,7 +218,7 @@ Namespace.prototype.getEnum = function getEnum(name) {
217218 */
218219Namespace . prototype . add = function add ( object ) {
219220
220- if ( ! ( object instanceof Field && object . extend !== undefined || object instanceof Type || object instanceof Enum || object instanceof Service || object instanceof Namespace ) )
221+ if ( ! ( object instanceof Field && object . extend !== undefined || object instanceof Type || object instanceof OneOf || object instanceof Enum || object instanceof Service || object instanceof Namespace ) )
221222 throw TypeError ( "object must be a valid nested object" ) ;
222223
223224 if ( ! this . nested )
Original file line number Diff line number Diff line change @@ -8,6 +8,9 @@ var def = {
88} ;
99
1010var proto = "syntax = \"proto3\";\
11+ import \"google/protobuf/descriptor.proto\";\
12+ extend google.protobuf.FileOptions { optional int32 ecs_component_id = 50000;}\
13+ option (ecs_component_id) = 1020;\
1114message Test {\
1215 oneof kind {\
1316 uint32 a = 1;\
You can’t perform that action at this time.
0 commit comments