ericvana / protobuf-net

Automatically exported from code.google.com/p/protobuf-net
Other
0 stars 0 forks source link

Invalid C# code generated from .proto with enum #275

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Please include an e-mail address if this might need a dialogue!
==============

What steps will reproduce the problem?
1.
Compile test.proto with protogen.exe or the custom tool in visual studio.

test.proto (same as attached);

enum SomeState
{
    SO_First = 1;
    SO_Second = 2;
};

message SomeMessage
{
    optional SomeState State = 1;
};

2.

The generated .cs file contains invalid C# code

3.

What is the expected output? What do you see instead?

The line in error contains code similar to this;

    private SomeState _State = SomeState.;

Which obviously generates error during compilation.

What version of the product are you using? On what operating system?

protobuf-net-VS10.msi  Visual Studio 2008 / 2010 support   Apr 14, 2010 SHA1 
Checksum:  482c3308cb1aba103b5f94da4b5793aa98b1e664  

Windows 7 Ultimate SP1 x64

Please provide any additional information below.

Original issue reported on code.google.com by t1.thoma...@gmail.com on 28 Feb 2012 at 9:09

Attachments: