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

Side by Side Diff: test/mjsunit/es6/block-scope-class.js

Issue 1551443002: Ship ES2015 sloppy-mode function hoisting, let, class (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Re-add another test 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 // Test for conflicting variable bindings. 5 // Test for conflicting variable bindings.
6 6
7 // Flags: --harmony-sloppy --harmony-sloppy-function 7 // Flags: --harmony-sloppy --harmony-sloppy-function
8 8
9 function AssertEqualsStrictAndSloppy(value, code) { 9 function AssertEqualsStrictAndSloppy(value, code) {
10 assertEquals(value, eval("(function() {" + code + "})()")); 10 assertEquals(value, eval("(function() {" + code + "})()"));
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 AssertThrowsStrictAndSloppy("class x { }; for (var x = 0; false;) { };", 50 AssertThrowsStrictAndSloppy("class x { }; for (var x = 0; false;) { };",
51 SyntaxError); 51 SyntaxError);
52 AssertThrowsStrictAndSloppy("for (var x = 0; false;) { }; class x { };", 52 AssertThrowsStrictAndSloppy("for (var x = 0; false;) { }; class x { };",
53 SyntaxError); 53 SyntaxError);
54 })(); 54 })();
55 55
56 (function TestClassMutableBinding() { 56 (function TestClassMutableBinding() {
57 AssertEqualsStrictAndSloppy( 57 AssertEqualsStrictAndSloppy(
58 "x3", "class x { }; var y = x.name; x = 3; return y + x;") 58 "x3", "class x { }; var y = x.name; x = 3; return y + x;")
59 })(); 59 })();
OLDNEW
« no previous file with comments | « test/mjsunit/es6/block-non-strict-errors.js ('k') | test/mjsunit/es6/classes-derived-return-type.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698