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

Jens Geyer commented on THRIFT-1768:
------------------------------------

I'm not sure, but could forcing the required flag to be T_OPTIONAL for members 
of a union a better way to handle this? The warning should be left there as 
well, but the modified value would make sure, all languages that lack the extra 
union check would handle this edge case correctly.

(Thanks to Kenjiro for the idea)
                
> unions can't have required fields (Compiler)
> --------------------------------------------
>
>                 Key: THRIFT-1768
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1768
>             Project: Thrift
>          Issue Type: Bug
>          Components: Compiler (General)
>    Affects Versions: 0.8, 0.9
>            Reporter: Jens Geyer
>            Assignee: Jens Geyer
>             Fix For: 1.0
>
>         Attachments: 
> THRIFT-1768_unions_cant_have_required_fields_Compiler.patch
>
>
> Required fields within unions should issue a warning. First, required makes 
> not much sense with unions. Next, most languages are already treating them as 
> optional anyway, effectively ignoring the required attribute.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to