Closed denizzzka closed 8 years ago
Any update on this one? I'm running into the same issue.
This appears to only happen when the int32
declaration is the first member declaration in a message.
This may not be a bug at all, just a very confusing error message.
You can't have a variable named version
in D. This should work if you change the Info
and DenseInfo
version
members to something else.
You have no idea how hard I hit my head when I read that...
This is incentive to clean up the errors it gives, at least.
Minimal test case:
unittest
{
import dproto.parse;
enum pbstring = q{
message Info {
optional int32 version = 1 [default = -1];
}
};
mixin ProtocolBufferFromString!pbstring;
}
I know how you feel, I had the same reaction when I finally saw it.
proto file: