Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 338532 - [editor] closure compiler complains that "char" is a reserved word
Summary: [editor] closure compiler complains that "char" is a reserved word
Status: RESOLVED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: Client (show other bugs)
Version: 0.2   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 0.2   Edit
Assignee: Felipe Heidrich CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-01 09:04 EST by Andrew Niefer CLA
Modified: 2011-09-01 11:41 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Niefer CLA 2011-03-01 09:04:28 EST
The running the google closure compiler during the releng build, it fails on editor.js complaining that "char" is a reserved word.


     [java] 
     [java] /shared/eclipse/e4/orion/I201103010200/plugins/org.eclipse.orion.client.editor/web/js/editor.js:2802: ERROR - Parse error. missing variable name
     [java] if (char !== " ") {
     [java]          ^
     [java] 
     [java] /shared/eclipse/e4/orion/I201103010200/plugins/org.eclipse.orion.client.editor/web/js/editor.js:2803: ERROR - Parse error. identifier is a reserved word
     [java]     text += char;
     [java] 	        ^
Comment 2 John Arthorne CLA 2011-03-02 09:00:34 EST
Interesting. Closure appears to be incorrect. "char" is not a reserved word in ECMAScript or JavaScript:

http://people.mozilla.org/~jorendorff/es5.html#sec-7.6.1
https://developer.mozilla.org/en/JavaScript/Reference/Reserved_Words
Comment 3 John Arthorne CLA 2011-03-02 09:02:05 EST
Here is the closure bug... I guess its easier to just change our code anyway:

http://code.google.com/p/closure-compiler/issues/detail?id=357