Heh, thanks!

I'm pretty new to JS and was just going off of the error message that
google's Closure compiler produced :) We have a couple more patches
that I will submit later this week once I clean them up - one has to
do with namespace declarations (don't overwrite an already-declared
namespace with {}), the other with serializing Map objects.

-- Ilya

On Tue, Sep 21, 2010 at 7:09 PM, Eugene Letuchy <eletu...@facebook.com> wrote:
> It doesn't just break in IE : it's a violation of the JS standard, which
> doesn't allow for trailing commas.
>
> - Eugene
>
> On 9/21/10 11:51 AM, Ilya Maykov (JIRA) wrote:
>>
>> (JavaScript compiler) Const structs, maps, sets, and lists generate a
>> trailing comma
>>
>> ------------------------------------------------------------------------------------
>>
>>                  Key: THRIFT-911
>>                  URL: https://issues.apache.org/jira/browse/THRIFT-911
>>              Project: Thrift
>>           Issue Type: Bug
>>           Components: JavaScript - Compiler
>>     Affects Versions: 0.4
>>             Reporter: Ilya Maykov
>>
>>
>> The JavaScript compiler generates a trailing comma when compiling
>> non-primitive constants. For example, this thrift code:
>>
>> namespace js Toy
>> const map<byte,string>  TOY_MAP = {
>>   1 : "ONE",
>>   2 : "TWO",
>>   3 : "THREE"
>> }
>>
>> generates this JavaScript code:
>>
>> Toy.TOY_MAP = {1 : 'ONE',
>> 2 : 'TWO',
>> 3 : 'THREE',
>> }
>>
>> According to Google's Closure compiler, this will breaks in some versions
>> of IE. We have a patch available and would like to submit it to trunk.
>> The bug is present in at least 0.4.0 and in trunk as of revision r999487.
>>
>

Reply via email to