Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
0.7
-
None
-
Patch Available
Description
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.