You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Ethan Urie (JIRA)" <ji...@apache.org> on 2011/05/27 16:54:47 UTC

[jira] [Updated] (THRIFT-1181) AS3 compiler generates incorrect code for setting default values in constructor

     [ https://issues.apache.org/jira/browse/THRIFT-1181?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ethan Urie updated THRIFT-1181:
-------------------------------

    Attachment: THRIFT-1181_correct_default_value_syntax.patch

> AS3 compiler generates incorrect code for setting default values in constructor
> -------------------------------------------------------------------------------
>
>                 Key: THRIFT-1181
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1181
>             Project: Thrift
>          Issue Type: Bug
>          Components: AS3 - Compiler
>    Affects Versions: 0.6, 0.6.1, 0.7
>         Environment: Mac OS X 10.6.7
>            Reporter: Ethan Urie
>            Priority: Minor
>         Attachments: THRIFT-1181_correct_default_value_syntax.patch
>
>
> If you create a thrift struct and set a field to have a default value, the compiler puts the code to set that default value in the constructor of the generated class. When it does this, it adds {{:Type}} to the right of the variable, e.g., {{this.count:int = 0;}}. The generated statement isn't correct syntax and fails to compile. The correct syntax would simply be {{this.count = 0;}}.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira