[
https://issues.apache.org/jira/browse/THRIFT-1432?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Mike Riley updated THRIFT-1432:
-------------------------------
Attachment: thrift-1432.patch
> Javascript struct constants declared in the same file as their struct
> definition will cause an error
> ----------------------------------------------------------------------------------------------------
>
> Key: THRIFT-1432
> URL: https://issues.apache.org/jira/browse/THRIFT-1432
> Project: Thrift
> Issue Type: Bug
> Components: JavaScript - Compiler
> Affects Versions: 0.7
> Reporter: Mike Riley
> Priority: Minor
> Attachments: thrift-1432.patch
>
>
> Constants are written out to the generated javascript file before structs
> are, so if you declare a constant that is of a type declared in the same
> file, you'll get an error telling you '<member name> is not a property of
> undefined' or something similar.
> I fixed this by swapping the order in which structs and constants are written
> out in t_generator, and it doesn't seem to have broken anything in java,
> javascript, cocoa, php or c++. However, it could probably use a little
> testing in other languages.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira