Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Protoparse cannot parse group inside oneof #256

Closed
bufdev opened this issue Aug 1, 2019 · 2 comments
Closed

Protoparse cannot parse group inside oneof #256

bufdev opened this issue Aug 1, 2019 · 2 comments

Comments

@bufdev
Copy link
Contributor

bufdev commented Aug 1, 2019

This is actually valid Protobuf:

// a.proto

syntax = "proto2";

message Foo {
  oneof bar {
    group Baz = 1 {
      optional int64 bat = 2;
    }
  }
}
  • protoc a.proto -o /dev/null completes successfully
  • goprotoc a.proto -o /dev/null returns a.proto:7:19: syntax error: unexpected '{', expecting ';' or '['
@jhump
Copy link
Owner

jhump commented Aug 2, 2019

Weird. I did not know that they extended group support to oneofs. I guess I should read that part of the protoc code more closely...

I think it should be pretty easy to fix, luckily.

@jhump
Copy link
Owner

jhump commented Aug 2, 2019

Fixed in #262

@jhump jhump closed this as completed Aug 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants