thrift-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jens Geyer (Jira)" <j...@apache.org>
Subject [jira] [Updated] (THRIFT-5072) Haskell generator fails to distinguish between multiple enum types with conflicting enum identifiers
Date Thu, 06 Feb 2020 22:19:00 GMT

     [ https://issues.apache.org/jira/browse/THRIFT-5072?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jens Geyer updated THRIFT-5072:
-------------------------------
    Summary: Haskell generator fails to distinguish between multiple enum types with conflicting
enum identifiers  (was: Haskell generator fails to distinguish between multiple enum types
having conflicting enum identifiers)

> Haskell generator fails to distinguish between multiple enum types with conflicting enum
identifiers
> ----------------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-5072
>                 URL: https://issues.apache.org/jira/browse/THRIFT-5072
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Haskell - Compiler, Tutorial
>            Reporter: Homare Yoneda
>            Priority: Major
>              Labels: Breaking-Change
>
> 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



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message