Opened 10 years ago

Closed 10 years ago

#9039 closed defect (wontfix)

var float; causes ShrinkSafe to fail in release mode.

Reported by: Aleksey Rechinskiy Owned by: alex
Priority: high Milestone: tbd
Component: ShrinkSafe Version: 1.3.0
Keywords: Cc:
Blocked By: Blocking:

Description

Create js file with variable var float; This variable is legal (it works as expected in FF3, IE6-7, Opera9.64 and makes me think, that it is legal)

Try to build the file in release mode. The complete build parameters are:

build.bat profileFile=%HOMEDIR%\myjs.profile.js action=clean,release releaseName=rel releaseDir="../../../c/" layerOptimize="shrinksafe" optimize="shrinksafe" copyTests=false cssOptimize=comments mini=true stripConsole=normal

When the build goes to optimizing baked file, you will get the following fatal error message:

release:  Optimizing (shrinksafe) file: ../../../c/rel/dojo/../App/baked-c.js
js: line 25688: missing variable name
js:     var float='dfd';
js: ..........^

Change History (2)

comment:1 Changed 10 years ago by dante

fwiw, 'float' is a reserved word, and probably _shouldn't_ work in all browsers. I know 'default' does not work, among others "unsed reservedwords"

comment:2 Changed 10 years ago by Adam Peller

Milestone: 1.3.1tbd
Resolution: wontfix
Status: newclosed

Sections 7.5.1/7.5.3 of the ECMA-262 spec show that 'float' is a FutureReservedWord? and thus a ReservedWord? which cannot be used as an identifier. Rhino honors this; the browsers may not. I think it's probably best that these keywords are rejected for portability, and we'd have a tough time hacking Rhino to avoid it anyway.

Note: See TracTickets for help on using tickets.