Lane: reflection/parse (sweep 2, finding 3)
Reserved names are enforced only for fields (src/type.js:412-415); oneofs check only the $ prefix (src/type.js:426-436) and Namespace.prototype.add (src/namespace.js:267-316) never consults reserved names — nested messages/enums with a reserved name are accepted.
Repro (executed): both accepted, protoc rejects:
pb.parse('syntax = "proto2"; message M { reserved "foo"; message foo {} }');
pb.parse('syntax = "proto2"; message M { reserved "foo"; oneof foo { int32 a = 1; } }');
Verdicts: both Confirm, Worth exploring (pedantic class).
Upstream: protobufjs#1284/protobufjs#1883 are enum-reserved topics, not this gap.
Decision question: Adopt (extend reserved-name checks to nested namespaces and oneofs) or Reject as pedantic?
Lane: reflection/parse (sweep 2, finding 3)
Reserved names are enforced only for fields (
src/type.js:412-415); oneofs check only the$prefix (src/type.js:426-436) andNamespace.prototype.add(src/namespace.js:267-316) never consults reserved names — nested messages/enums with a reserved name are accepted.Repro (executed): both accepted, protoc rejects:
Verdicts: both Confirm, Worth exploring (pedantic class).
Upstream: protobufjs#1284/protobufjs#1883 are enum-reserved topics, not this gap.
Decision question: Adopt (extend reserved-name checks to nested namespaces and oneofs) or Reject as pedantic?