Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 1 | // Copyright 2015 the V8 project authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | // Flags: --turbo-filter=* --always-opt |
| 6 | |
| 7 | assertThrows(function() { |
| 8 | "use strict"; |
| 9 | try { |
| 10 | x = ref_error; |
| 11 | let x = 0; |
| 12 | } catch (e) { |
| 13 | throw e; |
| 14 | } |
| 15 | }, ReferenceError); |
| 16 | |
| 17 | assertThrows(function() { |
| 18 | "use strict"; |
| 19 | try { |
| 20 | x = ref_error; |
| 21 | let x = 0; |
| 22 | } finally { |
| 23 | // re-throw |
| 24 | } |
| 25 | }, ReferenceError); |