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

Side by Side Diff: test/mjsunit/regress/regress-3138.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
« no previous file with comments | « test/mjsunit/regress/regress-186.js ('k') | test/mjsunit/regress/regress-436896.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 2014 the V8 project authors. All rights reserved. 1 // 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 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: --legacy-const
6
5 (function f(){ 7 (function f(){
6 assertEquals("function", typeof f); 8 assertEquals("function", typeof f);
7 })(); 9 })();
8 10
9 (function f(){ 11 (function f(){
10 var f; // Variable shadows function name. 12 var f; // Variable shadows function name.
11 assertEquals("undefined", typeof f); 13 assertEquals("undefined", typeof f);
12 })(); 14 })();
13 15
14 (function f(){ 16 (function f(){
(...skipping 16 matching lines...) Expand all
31 33
32 // const initialization is not intercepted by with scope. 34 // const initialization is not intercepted by with scope.
33 (function() { 35 (function() {
34 var o = { a: 1 }; 36 var o = { a: 1 };
35 with (o) { 37 with (o) {
36 const a = 2; 38 const a = 2;
37 } 39 }
38 assertEquals(2, a); 40 assertEquals(2, a);
39 assertEquals(1, o.a); 41 assertEquals(1, o.a);
40 })(); 42 })();
OLDNEW
« no previous file with comments | « test/mjsunit/regress/regress-186.js ('k') | test/mjsunit/regress/regress-436896.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698