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

Unified Diff: test/mjsunit/harmony/destructuring.js

Issue 1565263002: Revert of Ship ES2015 sloppy-mode function hoisting, let, class (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: test/mjsunit/harmony/destructuring.js
diff --git a/test/mjsunit/harmony/destructuring.js b/test/mjsunit/harmony/destructuring.js
index 50f27857ec04ce302dacb2ab63139ac27167f61c..984efb00163330fecfd4a5404cd147e97e2fbd56 100644
--- a/test/mjsunit/harmony/destructuring.js
+++ b/test/mjsunit/harmony/destructuring.js
@@ -991,9 +991,8 @@
function f20({x}) { function x() { return 2 }; return x(); }
assertEquals(2, f20({x: 1}));
- // Function hoisting is blocked by the conflicting x declaration
function f21({x}) { { function x() { return 2 } } return x(); }
- assertThrows(() => f21({x: 1}), TypeError);
+ assertEquals(2, f21({x: 1}));
var g1 = ({x}) => { var x = 2; return x };
assertEquals(2, g1({x: 1}));
@@ -1026,7 +1025,7 @@
var g20 = ({x}) => { function x() { return 2 }; return x(); }
assertEquals(2, g20({x: 1}));
var g21 = ({x}) => { { function x() { return 2 } } return x(); }
- assertThrows(() => g21({x: 1}), TypeError);
+ assertEquals(2, g21({x: 1}));
assertThrows("'use strict'; function f(x) { let x = 0; }; f({});", SyntaxError);
assertThrows("'use strict'; function f({x}) { let x = 0; }; f({});", SyntaxError);
« no previous file with comments | « test/mjsunit/harmony/classes-derived-return-type.js ('k') | test/mjsunit/harmony/regress/regress-crbug-451770.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698