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

C# code for simple table containing enum field with non-zero default does not compile #252

Closed
mormegil-cz opened this issue Aug 11, 2015 · 2 comments

Comments

@mormegil-cz
Copy link
Contributor

As reported at the flatbuffers Google Group (and pointed out at PR 172), the following schema:

namespace FLBSchemas;
enum EColor : int {  Red = 1, Green, Blue }
table Generic {
    id:string (key);
    testColor:EColor = Red;
}
root_type Generic;

generates the following uncompilable C# code:

  public static int CreateGeneric(FlatBufferBuilder builder,
      int id = 0,
      EColor testColor = 1) {  //<-- error here
@mormegil-cz
Copy link
Contributor Author

A fix (+test) for this added at PR #253.

@ghost
Copy link

ghost commented Aug 12, 2015

Fix was merged: #253

@ghost ghost closed this as completed Aug 12, 2015
This issue was closed.
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