Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-5072

Haskell generator fails to distinguish between multiple enum types with conflicting enum identifiers

    XMLWordPrintableJSON

Details

    Description

      When the Haskell generator generate the data type like this

      enum Sample1

      { A = 0, B = 1, C = 2 }

      enum Sample2

      { C = 0, D = 1, E = 2 }

      Output will be like this

      data Sample1 = A|B|C
      ā€“ ...
      data Sample2 = C|D|E

      And this will make a compile error "Multiple declarations of ā€˜Cā€™".
      So I modified this to generate like this

      data Sample1 = Sample1_A|Sample1_B|Sample1_C
      ā€“ ...
      data Sample2 = Sample2_C|Sample2_D|Sample2_E

      Attachments

        Issue Links

          Activity

            People

              Homarechan Homare Yoneda
              Homarechan Homare Yoneda
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 10m
                  10m