| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 // | |
| 5 // Flags: --harmony-scoping | |
| 6 "use strict"; | 4 "use strict"; |
| 7 | 5 |
| 8 function f() { | 6 function f() { |
| 9 var y = 1; | 7 var y = 1; |
| 10 var q1; | 8 var q1; |
| 11 var q; | 9 var q; |
| 12 var z = new Error(); | 10 var z = new Error(); |
| 13 try { | 11 try { |
| 14 throw z; | 12 throw z; |
| 15 } catch (y) { | 13 } catch (y) { |
| 16 assertTrue(z === y); | 14 assertTrue(z === y); |
| 17 q1 = function() { return y; } | 15 q1 = function() { return y; } |
| 18 var y = 15; | 16 var y = 15; |
| 19 q = function() { return y; } | 17 q = function() { return y; } |
| 20 assertSame(15, y); | 18 assertSame(15, y); |
| 21 } | 19 } |
| 22 assertSame(1, y); | 20 assertSame(1, y); |
| 23 assertSame(15, q1()); | 21 assertSame(15, q1()); |
| 24 assertSame(15, q()); | 22 assertSame(15, q()); |
| 25 } | 23 } |
| 26 | 24 |
| 27 f(); | 25 f(); |
| OLD | NEW |