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

Unset enum value is printed by ToString()

    XMLWordPrintableJSON

    Details

      Description

      if enum is not set, ToString() returns a first enum value, but it should indicate that field is empty

      enum Distance
      {
      DISTANCE_1 = 0,
      DISTANCE_2 = 1,
      }

      struct RaceDetails {
      1: optional Distance distance,
      }

      c#:
      new RaceDetails().ToString()
      result: "RaceDetails(Distance:DISTANCE_1)"
      expected: "RaceDetails(Distance: )"

        Attachments

          Activity

            People

            • Assignee:
              jensg Jens Geyer
              Reporter:
              taphos Filipp Keks
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: