Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: test/mjsunit/es6/block-eval-var-over-let.js

Issue 1858943002: Remove runtime flags for sloppy mode block scoping features (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/mjsunit/es6/block-early-errors.js ('k') | test/mjsunit/es6/block-for-sloppy.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 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 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 4
5 // Flags: --harmony-sloppy --harmony-sloppy-let --harmony-sloppy-function
6
7 // Var-let conflict in a function throws, even if the var is in an eval 5 // Var-let conflict in a function throws, even if the var is in an eval
8 6
9 // Throws at the top level of a function 7 // Throws at the top level of a function
10 assertThrows(function() { 8 assertThrows(function() {
11 let x = 1; 9 let x = 1;
12 eval('var x'); 10 eval('var x');
13 }, TypeError); 11 }, TypeError);
14 12
15 // If the eval is in its own block scope, throws 13 // If the eval is in its own block scope, throws
16 assertThrows(function() { 14 assertThrows(function() {
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 { 132 {
135 let x = 1; 133 let x = 1;
136 eval('{ function x() {} }'); 134 eval('{ function x() {} }');
137 } 135 }
138 })(); 136 })();
139 } catch (e) { 137 } catch (e) {
140 caught = true; 138 caught = true;
141 } 139 }
142 // TODO(littledan): switch to assertTrue when bug is fixed 140 // TODO(littledan): switch to assertTrue when bug is fixed
143 assertTrue(caught); 141 assertTrue(caught);
OLDNEW
« no previous file with comments | « test/mjsunit/es6/block-early-errors.js ('k') | test/mjsunit/es6/block-for-sloppy.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698