summaryrefslogtreecommitdiff
path: root/deps/v8/test/mjsunit/strong/destructuring.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/test/mjsunit/strong/destructuring.js')
-rw-r--r--deps/v8/test/mjsunit/strong/destructuring.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/deps/v8/test/mjsunit/strong/destructuring.js b/deps/v8/test/mjsunit/strong/destructuring.js
index 67fe2ef4f1..3145dcfb4d 100644
--- a/deps/v8/test/mjsunit/strong/destructuring.js
+++ b/deps/v8/test/mjsunit/strong/destructuring.js
@@ -6,7 +6,10 @@
// Flags: --harmony-arrow-functions --strong-mode --allow-natives-syntax
(function() {
- function f({ x = function() { return []; } }) { "use strong"; return x(); }
+ var f = (function() {
+ "use strong";
+ return function f({ x = function() { return []; } }) { return x(); };
+ })();
var a = f({ x: undefined });
assertTrue(%IsStrong(a));
@@ -19,7 +22,10 @@
assertFalse(%IsStrong(a));
function outerf() { return []; }
- function f2({ x = outerf }) { "use strong"; return x(); }
+ var f2 = (function() {
+ "use strong";
+ return function f2({ x = outerf }) { return x(); };
+ })();
a = f2({ x: undefined });
assertFalse(%IsStrong(a));
})();