summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/language/block-scope/shadowing/const-declaration-shadowing-catch-parameter.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/tests/test262/language/block-scope/shadowing/const-declaration-shadowing-catch-parameter.js')
-rw-r--r--js/src/tests/test262/language/block-scope/shadowing/const-declaration-shadowing-catch-parameter.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/js/src/tests/test262/language/block-scope/shadowing/const-declaration-shadowing-catch-parameter.js b/js/src/tests/test262/language/block-scope/shadowing/const-declaration-shadowing-catch-parameter.js
new file mode 100644
index 0000000000..963ed3302e
--- /dev/null
+++ b/js/src/tests/test262/language/block-scope/shadowing/const-declaration-shadowing-catch-parameter.js
@@ -0,0 +1,25 @@
+// Copyright (C) 2011 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+es6id: 13.1
+description: >
+ const declaration shadowing catch parameter
+---*/
+function fn() {
+ var a = 1;
+ try {
+ throw 'stuff3';
+ } catch (a) {
+ {
+ // const declaration shadowing catch parameter
+ const a = 3;
+ assert.sameValue(a, 3);
+ }
+ assert.sameValue(a, 'stuff3');
+ }
+ assert.sameValue(a, 1);
+}
+fn();
+
+
+reportCompare(0, 0);