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

Generated Go enums' always appear to be <UNSET> in debuggers

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Go - Compiler
    • Labels:
      None

      Description

      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.

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                adc Alan Cabrera
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Time Tracking

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