test262/test/annexB/language/statements/try/catch-redeclared-var-statement.js
Mike Pennisi fbce4ea11c Reorganize tests for Annex B extensions
The "mainline" tests in Test262 are converging on a more formal
structure. Files are organized as tests for either either "language"
(e.g. syntax-driven) or "built-in" (e.g. API-driven). "Language" test
locations are themselves structured according to whether the syntactic
form under test is an Expression or a Statement.

To limit ambiguity when locating/adding tests, re-organize the tests for
Annex B extensions to match this structure.
2016-02-10 10:15:35 -05:00

21 lines
479 B
JavaScript

// Copyright (c) 2012 Ecma International. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es5id: 12.14-1
es6id: B.3.5
description: >
catch doesn't change declaration scope - var initializer in catch
with same name as catch parameter changes parameter
---*/
foo = "prior to throw";
try {
throw new Error();
}
catch (foo) {
var foo = "initializer in catch";
}
assert.sameValue(foo, "prior to throw");