User-Agent: Mozilla/5.0 (X11; U; Linux i686; de; rv:18.104.22.168) Gecko/2008092510 Ubuntu/8.04 (hardy) Firefox/3.0.3 Build Identifier: Rhino currently defaults to disallow future reserved words (ECMAScript 7.5.3) as identifiers. It seems all browser JS engines including spidermonkey allow these words to be used. Rhino has a FEATURE_RESERVED_KEYWORD_AS_IDENTIFIER which is false by default, and prints a warning message when this feature is set to true and a future reserved word is encountered. I propose to set the default value for FEATURE_RESERVED_KEYWORD_AS_IDENTIFIER to true and remove the warning. Reproducible: Always
Created attachment 344257 [details] [diff] [review] Fix for this bug Sets the default value for Context.FEATURE_RESERVED_KEYWORD_AS_IDENTIFIER to true. Also treat "export" and "import" as ordinary reserved words instead of actual keywords. They are listed as such in the ECMAScript spec, only spidermonkey uses them as actual keywords, but Rhino doesn't implement that feature.
Changing summary to "Improve handling of future reserved words" as I'll leave the default value for FEATURE_RESERVED_KEYWORD_AS_IDENTIFIER as false for now, but will commit the other changes.
Created attachment 348536 [details] [diff] [review] new patch updated patch to changes in CVS, leave default value for Context.FEATURE_RESERVED_KEYWORD_AS_IDENTIFIER as false.