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

Enum definitions outside of message declared as errors #12

Open
GoogleCodeExporter opened this issue Sep 27, 2015 · 5 comments
Open

Enum definitions outside of message declared as errors #12

GoogleCodeExporter opened this issue Sep 27, 2015 · 5 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Create a proto file using the default template.
2. Create an enum type.
3. The syntax parser gives an "unexpected token" error.

What is the expected output? What do you see instead?
Declaring enum outside of a message is valid, the expected output is for no
errors to appear.

What version of the product are you using? On what operating system?
Protobuf Editor reports 2.0.1, Netbeans 6.8.

Please provide any additional information below.


Original issue reported on code.google.com by Ethereal...@gmail.com on 12 Feb 2010 at 4:46

@GoogleCodeExporter
Copy link
Author

Tested with:

enum Test {
    MSG1 = 1;
    MSG2 = 2;
}

and works like a charm. 

Send example 'proto' definition that is causing the problem.

Original comment by piotr.tabor on 21 Jun 2010 at 9:13

@GoogleCodeExporter
Copy link
Author

I can confirm this bug.
I had this:

.
.
.
enum ReturnType {
  OK = 0;
  FAIL = 1;
}
.
.
.

Original comment by dejan.lekic on 28 Jun 2010 at 9:37

Attachments:

@GoogleCodeExporter
Copy link
Author

The problem is not 'enum' support, but  '0' as enum value support. 

It works: 

enum ReturnType {
  OK = 2;
  FAIL = 1;
}

Will fix it. 

Original comment by piotr.tabor on 28 Jun 2010 at 4:20

@GoogleCodeExporter
Copy link
Author

True Piotr, thanks for reply and wonderful work! :)

Original comment by dejan.lekic on 29 Jun 2010 at 8:35

@GoogleCodeExporter
Copy link
Author

#3 piotr.tabor:
> The problem is not 'enum' support, but  '0' as enum value support.

will this be fixed?
I have lots of enums with 0...

Original comment by supero...@gmail.com on 31 Oct 2011 at 1:24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant