jet / falanx

Generates F# code from protobuf schema for binary and json format

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Enum with duplicate value produced code with duplicates

7sharp9 opened this issue · comments

Given the following proto:

// Test an enum that has multiple values with the same number.
enum TestEnumWithDupValue {
  TEST_ENUM_WITH_DUP_VALUE_UNSPECIFIED = 0;
  option allow_alias = true;

  FOO1 = 1;
  BAR1 = 2;
  BAZ = 3;
  FOO2 = 1;
  BAR2 = 2;
}

This code is generated:

type TestEnumWithDupValue =
    | TestEnumWithDupValueUnspecified = 0
    | Foo1 = 1
    | Bar1 = 2
    | Baz = 3
    | Foo2 = 1
    | Bar2 = 2

We need to check what behaviour should happen on this error/failure etc.