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

Hudson commented on THRIFT-1432:
--------------------------------

Integrated in Thrift #339 (See [https://builds.apache.org/job/Thrift/339/])
    Thrift-1432: Javascript struct constants declared in the same file as their 
struct definition will cause an error
Client: js
Patch: Mike Riley

Flips print out of constants and structs within the generator to allow for use 
of constants within the structs.

                
> 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
>            Assignee: Mike Riley
>            Priority: Minor
>             Fix For: 0.8
>
>         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

        

Reply via email to