File tree 2 files changed +6
-2
lines changed
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");
6
6
( ( Namespace . prototype = Object . create ( ReflectionObject . prototype ) ) . constructor = Namespace ) . className = "Namespace" ;
7
7
8
8
var Field = require ( "./field" ) ,
9
- util = require ( "./util" ) ;
9
+ util = require ( "./util" ) ,
10
+ OneOf = require ( "./oneof" ) ;
10
11
11
12
var Type , // cyclic
12
13
Service ,
@@ -217,7 +218,7 @@ Namespace.prototype.getEnum = function getEnum(name) {
217
218
*/
218
219
Namespace . prototype . add = function add ( object ) {
219
220
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 ) )
221
222
throw TypeError ( "object must be a valid nested object" ) ;
222
223
223
224
if ( ! this . nested )
Original file line number Diff line number Diff line change @@ -8,6 +8,9 @@ var def = {
8
8
} ;
9
9
10
10
var 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;\
11
14
message Test {\
12
15
oneof kind {\
13
16
uint32 a = 1;\
You can’t perform that action at this time.
0 commit comments