]> code.delx.au - gnu-emacs-elpa/commitdiff
Change warning message to not conflict with spec
authorDaniel Landau <daniel@landau.fi>
Wed, 4 May 2016 11:35:55 +0000 (14:35 +0300)
committerDaniel Landau <daniel@landau.fi>
Wed, 4 May 2016 11:35:55 +0000 (14:35 +0300)
The ECMAScript spec says
(http://www.ecma-international.org/ecma-262/5.1/#sec-10.5) that
declaring an already declared variable is silently ignored, so claiming
it's a TypeError is not correct. It should still be highlighted as a
warning because it's not something that any program should do and with
let redeclaration actually is a TypeError.

js2-mode.el

index b2efce007d3d0f5590596e28a470874a26d07b12..9515e2703ce33fd56a81f5d6a674ff52756a02f3 100644 (file)
@@ -1456,7 +1456,7 @@ the correct number of ARGS must be provided."
          "Compilation produced %s syntax errors.")
 
 (js2-msg "msg.var.redecl"
-         "TypeError: redeclaration of var %s.")
+         "Redeclaration of var %s.")
 
 (js2-msg "msg.const.redecl"
          "TypeError: redeclaration of const %s.")