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

Side by Side Diff: test/mjsunit/es6/block-let-contextual-sloppy.js

Issue 1571873004: Ship ES2015 sloppy-mode const semantics (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Associate with --harmony-shipping Created 4 years, 11 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-destructuring-bind 5 // Flags: --harmony-sloppy --harmony-sloppy-let --harmony-destructuring-bind
6 // Flags: --legacy-const
6 7
7 // let is usable as a variable with var or legacy const, not let or ES6 const 8 // let is usable as a variable with var or legacy const, not let or ES6 const
8 9
9 (function (){ 10 (function (){
10 assertEquals(undefined, let); 11 assertEquals(undefined, let);
11 12
12 var let; 13 var let;
13 14
14 let = 5; 15 let = 5;
15 assertEquals(5, let); 16 assertEquals(5, let);
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 })(); 58 })();
58 59
59 (function() { 60 (function() {
60 function let() { 61 function let() {
61 return 1; 62 return 1;
62 } 63 }
63 assertEquals(1, let()); 64 assertEquals(1, let());
64 })() 65 })()
65 66
66 assertThrows('for (let of []) {}', SyntaxError); 67 assertThrows('for (let of []) {}', SyntaxError);
OLDNEW
« no previous file with comments | « test/mjsunit/es6/block-eval-var-over-legacy-const.js ('k') | test/mjsunit/global-const-var-conflicts.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698