You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Jens Geyer (JIRA)" <ji...@apache.org> on 2013/10/29 23:49:25 UTC

[jira] [Comment Edited] (THRIFT-2246) Unset enum value is printed by ToString in c# class

    [ https://issues.apache.org/jira/browse/THRIFT-2246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13808483#comment-13808483 ] 

Jens Geyer edited comment on THRIFT-2246 at 10/29/13 10:48 PM:
---------------------------------------------------------------

Confirmed. 


was (Author: jensg):
Confirmed. The expected result would be RaceDetails(), at least compared against Java version.

> Unset enum value is printed by ToString in c# class
> ---------------------------------------------------
>
>                 Key: THRIFT-2246
>                 URL: https://issues.apache.org/jira/browse/THRIFT-2246
>             Project: Thrift
>          Issue Type: Bug
>          Components: C# - Compiler, Delphi - Compiler
>    Affects Versions: 0.9.1
>            Reporter: Filipp Keks
>            Assignee: Jens Geyer
>            Priority: Minor
>             Fix For: 0.9.2
>
>
> 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: )"



--
This message was sent by Atlassian JIRA
(v6.1#6144)