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

Sylwester Lachiewicz closed THRIFT-5378.
----------------------------------------
    Resolution: Cannot Reproduce

The reporter withdrew this in April 2021: "Bah. I'm unable to reproduce now. 
Could be the newer version of Goland I am using."

The generated String() method still returns "<UNSET>" for a value outside the 
enum, which is intended: it is the fallback after the known values are 
exhausted, and a debugger that shows it for a valid value is reading the wrong 
thing.

Closing as cannot reproduce. Reopen with a debugger and Thrift version if it 
comes back.

> Generated Go enums' always appear to be <UNSET> in debuggers
> ------------------------------------------------------------
>
>                 Key: THRIFT-5378
>                 URL: https://issues.apache.org/jira/browse/THRIFT-5378
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Go - Compiler
>            Reporter: Alan Cabrera
>            Priority: Minor
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> Currently, the generated Go enums' {{String()}} method returns "<UNSET>", 
> when its value is unknown, by the return statement at the end of the 
> function.  For reasons unknown to me, this causes all enums in my debugger to 
> have the value "<UNSET>", even though they do have a proper value.
> If I move the return statement up into a default case of the switch 
> statement, everything seems to display perfectly in the debugger.  It's a 
> simple enough fix and I will submit a patch today.
>  



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

Reply via email to