In google.golang.org/protobuf v1.28.1,  reflect/protoregistry/registry.go, 
comment says:

// It is permitted for multiple files to have the same file path.
func (r *Files) RegisterFile(file protoreflect.FileDescriptor) error {
  ...
}

But as the code says: 

path := file.Path()
if prev := r.filesByPath[path]; len(prev) > 0 {
  r.checkGenProtoConflict(path)
  err := errors.New("file %q is already registered", file.Path())
  err = amendErrorWithCaller(err, prev[0], file)
  if !(r == GlobalFiles && ignoreConflict(file, err)) {
    return err
  }
}

It seems that the code and the comment is not the same.
Please, anyone knows why?

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/8044d2d4-e8f9-4a37-8215-3f77567cbd80n%40googlegroups.com.

Reply via email to