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

getting error while using "oneof" & "map" tag in proto file #37

Open
onlynishant opened this issue Nov 30, 2017 · 0 comments
Open

getting error while using "oneof" & "map" tag in proto file #37

onlynishant opened this issue Nov 30, 2017 · 0 comments

Comments

@onlynishant
Copy link

onlynishant commented Nov 30, 2017

I am using "oneof" tag in my proto file but getting error while using it.

Msg.proto

// THIS DOESN'T WORK
message Msg1 {
  required string id = 1;
  repeated string name = 2;
  // Use either of them
  oneof login_oneof {
    string email = 3;
    string username = 4;
 }
map<int32, string> maps = 3;
}

// THIS WORKS
message Msg2 {
  required string id = 1;
  repeated string name = 2;
  optional string email = 3;
  optional string username = 4;
}

Error:
lua entry thread aborted: runtime error: Lexical error in line 6, near "p = 2;\n\n o": expected '}'

@onlynishant onlynishant changed the title getting error while using "oneof" tag in proto file getting error while using "oneof" & "map" tag in proto file Dec 8, 2017
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

1 participant