catch-parameter-shadowing-function-parameter-name.js (459B)
1 // Copyright (C) 2011 the V8 project authors. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 /*--- 4 es6id: 13.1 5 description: > 6 catch parameter shadowing function parameter name 7 ---*/ 8 function fn(a) { 9 try { 10 throw 'stuff1'; 11 } catch (a) { 12 assert.sameValue(a, 'stuff1'); 13 // catch parameter shadowing function parameter name 14 a = 2; 15 assert.sameValue(a, 2); 16 } 17 } 18 fn(1); 19 20 21 reportCompare(0, 0);