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

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

Issue 1819123002: Remove support for legacy const, part 1 (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased, deleted one more file Created 4 years, 9 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
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 --no-l egacy-const 5 // Flags: --harmony-sloppy --harmony-sloppy-let --harmony-sloppy-function
6 6
7 // Var-let conflict in a function throws, even if the var is in an eval 7 // Var-let conflict in a function throws, even if the var is in an eval
8 8
9 // Throws at the top level of a function 9 // Throws at the top level of a function
10 assertThrows(function() { 10 assertThrows(function() {
11 let x = 1; 11 let x = 1;
12 eval('var x'); 12 eval('var x');
13 }, TypeError); 13 }, TypeError);
14 14
15 // If the eval is in its own block scope, throws 15 // If the eval is in its own block scope, throws
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 { 134 {
135 let x = 1; 135 let x = 1;
136 eval('{ function x() {} }'); 136 eval('{ function x() {} }');
137 } 137 }
138 })(); 138 })();
139 } catch (e) { 139 } catch (e) {
140 caught = true; 140 caught = true;
141 } 141 }
142 // TODO(littledan): switch to assertTrue when bug is fixed 142 // TODO(littledan): switch to assertTrue when bug is fixed
143 assertTrue(caught); 143 assertTrue(caught);
OLDNEW
« no previous file with comments | « test/mjsunit/harmony/block-const-assign-sloppy.js ('k') | test/mjsunit/harmony/block-for-sloppy.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698