blob: efd4b1e75841ca8a0b8955b2f7bc0f037cf76d09 [file] [log] [blame]
Emily Bernierd0a1eb72015-03-24 16:35:39 -04001// 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
3// found in the LICENSE file.
4
5try {
6 throw 0;
7} catch(e) {
8 assertSame(3, eval("delete x; const x=3; x"));
9}
10
11
12try {
13 throw 0;
14} catch(e) {
15 assertSame(3, (1,eval)("delete x1; const x1=3; x1"));
16}
17
18
19try {
20 throw 0;
21} catch(e) {
22 with({}) {
23 assertSame(3, eval("delete x2; const x2=3; x2"));
24 }
25}
26
27
28(function f() {
29 try {
30 throw 0;
31 } catch(e) {
32 assertSame(3, eval("delete x; const x=3; x"));
33 }
34}());
35
36
37(function f() {
38 try {
39 throw 0;
40 } catch(e) {
41 assertSame(3, (1,eval)("delete x4; const x4=3; x4"));
42 }
43}());