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

Dmytro Shteflyuk reassigned THRIFT-5911:
----------------------------------------

    Assignee: Dmytro Shteflyuk

> Inconsistent UUID compilation for aliased types
> -----------------------------------------------
>
>                 Key: THRIFT-5911
>                 URL: https://issues.apache.org/jira/browse/THRIFT-5911
>             Project: Thrift
>          Issue Type: Bug
>          Components: C++ - Compiler
>            Reporter: Dmytro Shteflyuk
>            Assignee: Dmytro Shteflyuk
>            Priority: Major
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> For the ConstantsDemo.thrift, we have:
> {noformat}
> typedef uuid myUUID
> struct thing {
>   1: i32  hello,
>   2: i32  goodbye
>   3: uuid id
>   4: myUUID my_id
>   5: optional myUUID my_optional_id
> }
> // uuids are accepted with or without curly braces
> const uuid GEN_UUID =  '00000000-4444-CCCC-ffff-0123456789ab'
> const uuid GEN_GUID = '{00112233-4455-6677-8899-aaBBccDDeeFF}'
> const myUUID MY_UUID =  '00000000-4444-CCCC-ffff-0123456789ab'
> const myUUID MY_GUID = '{00112233-4455-6677-8899-aaBBccDDeeFF}'
> {noformat}
> Interestingly, when {{uuid}} is compiled, it produces a string without curly 
> braces, but for alias {{myUUID}} the curly braces stay:
> {noformat:ruby}
>   GEN_UUID = %q"00000000-4444-CCCC-ffff-0123456789ab"
>   GEN_GUID = %q"00112233-4455-6677-8899-aaBBccDDeeFF"
>   MY_UUID = %q"00000000-4444-CCCC-ffff-0123456789ab"
>   MY_GUID = %q"{00112233-4455-6677-8899-aaBBccDDeeFF}"
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to