[
https://issues.apache.org/jira/browse/THRIFT-339?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12672781#action_12672781
]
Esteve Fernandez commented on THRIFT-339:
-----------------------------------------
Although I'm happy to admit any breakage cause :-) I don't think this issue is
valid (or at least, not for the reasons exposed). Note that you're not using a
field key, and thus the thrift_spec variable is not populated at all. You can
fix this using a positive field key:
{{ service Test
bool get_slice(1:i32 start = -1), }}
> functions with default values broken by #242 (r734536)
> ------------------------------------------------------
>
> Key: THRIFT-339
> URL: https://issues.apache.org/jira/browse/THRIFT-339
> Project: Thrift
> Issue Type: Bug
> Components: Compiler (Python)
> Reporter: Jonathan Ellis
> Priority: Blocker
>
> Esteve's last change to how default values are stored broke stuff. Here is a
> quick example:
> {{
> service Test
> {
> bool get_slice(i32 start = -1),
> }
> }}
> generates
> {{
> class get_slice_args:
> thrift_spec = None
> def __init__(self, start=thrift_spec[-1][4],):
> self.start = start
> }}
> which is obviously invalid.
> I'm not sure how thrift_spec is supposed to be populated here so I'm unsure
> how to fix this.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.