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

Side by Side Diff: test/mjsunit/es6/sloppy-restrictive-block-function.js

Issue 2478883002: Remove always-true --harmony-restrictive-declarations flag (Closed)
Patch Set: Formatting Created 4 years, 1 month 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/cctest/test-parsing.cc ('k') | test/mjsunit/harmony/sloppy-implicit-block-function.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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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-restrictive-declarations
6
7 // ES#sec-functiondeclarations-in-ifstatement-statement-clauses 5 // ES#sec-functiondeclarations-in-ifstatement-statement-clauses
8 // Annex B 3.4 FunctionDeclarations in IfStatement Statement Clauses 6 // Annex B 3.4 FunctionDeclarations in IfStatement Statement Clauses
9 // In sloppy mode, function declarations in if statements act like 7 // In sloppy mode, function declarations in if statements act like
10 // they have a block around them. Prohibited in strict mode. 8 // they have a block around them. Prohibited in strict mode.
11 (function() { 9 (function() {
12 if (false) function f() { }; 10 if (false) function f() { };
13 assertEquals(undefined, f); 11 assertEquals(undefined, f);
14 })(); 12 })();
15 13
16 (function() { 14 (function() {
(...skipping 26 matching lines...) Expand all
43 41
44 (function() { 42 (function() {
45 function bar() { 43 function bar() {
46 return f; 44 return f;
47 { 45 {
48 x: function f() {} 46 x: function f() {}
49 } 47 }
50 } 48 }
51 assertEquals(undefined, bar()); 49 assertEquals(undefined, bar());
52 })(); 50 })();
OLDNEW
« no previous file with comments | « test/cctest/test-parsing.cc ('k') | test/mjsunit/harmony/sloppy-implicit-block-function.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698