branch: master
commit 5ebc7b84b857d7f3c1448e7794b8900d752c09ab
Author: Daniel Landau <[email protected]>
Commit: Daniel Landau <[email protected]>
Change warning message to not conflict with spec
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 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/js2-mode.el b/js2-mode.el
index b2efce0..9515e27 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -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.")