scope-catch-param-lex-close.js (465B)
1 // Copyright (C) 2016 the V8 project authors. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 /*--- 4 esid: sec-runtime-semantics-catchclauseevaluation 5 description: Removal of lexical environment for `catch` parameter 6 ---*/ 7 8 var probe, x; 9 10 try { 11 throw 'inside'; 12 } catch (x) { 13 probe = function() { return x; }; 14 } 15 x = 'outside'; 16 17 assert.sameValue(x, 'outside'); 18 assert.sameValue(probe(), 'inside'); 19 20 reportCompare(0, 0);