summaryrefslogtreecommitdiff
path: root/deps/v8/test/mjsunit/es6/destructuring.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/test/mjsunit/es6/destructuring.js')
-rw-r--r--deps/v8/test/mjsunit/es6/destructuring.js22
1 files changed, 11 insertions, 11 deletions
diff --git a/deps/v8/test/mjsunit/es6/destructuring.js b/deps/v8/test/mjsunit/es6/destructuring.js
index 1f16c45270..a4f88844d4 100644
--- a/deps/v8/test/mjsunit/es6/destructuring.js
+++ b/deps/v8/test/mjsunit/es6/destructuring.js
@@ -1045,9 +1045,9 @@
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);
+ // Annex B 3.3 function hoisting is blocked by the conflicting x declaration
+ function f21({x}) { { function x() { return 2 } } return x; }
+ assertEquals(1, f21({x: 1}));
var g1 = ({x}) => { var x = 2; return x };
assertEquals(2, g1({x: 1}));
@@ -1082,15 +1082,15 @@
var g21 = ({x}) => { { function x() { return 2 } } return x(); }
assertThrows(() => g21({x: 1}), TypeError);
- assertThrows("'use strict'; function f(x) { let x = 0; }; f({});", SyntaxError);
- assertThrows("'use strict'; function f({x}) { let x = 0; }; f({});", SyntaxError);
- assertThrows("'use strict'; function f(x) { const x = 0; }; f({});", SyntaxError);
- assertThrows("'use strict'; function f({x}) { const x = 0; }; f({});", SyntaxError);
+ assertThrows("'use strict'; function f(x) { let x = 0; }", SyntaxError);
+ assertThrows("'use strict'; function f({x}) { let x = 0; }", SyntaxError);
+ assertThrows("'use strict'; function f(x) { const x = 0; }", SyntaxError);
+ assertThrows("'use strict'; function f({x}) { const x = 0; }", SyntaxError);
- assertThrows("'use strict'; let g = (x) => { let x = 0; }; f({});", SyntaxError);
- assertThrows("'use strict'; let g = ({x}) => { let x = 0; }; f({});", SyntaxError);
- assertThrows("'use strict'; let g = (x) => { const x = 0; }; f({});", SyntaxError);
- assertThrows("'use strict'; let g = ({x}) => { const x = 0; }; f({});", SyntaxError);
+ assertThrows("'use strict'; let g = (x) => { let x = 0; }", SyntaxError);
+ assertThrows("'use strict'; let g = ({x}) => { let x = 0; }", SyntaxError);
+ assertThrows("'use strict'; let g = (x) => { const x = 0; }", SyntaxError);
+ assertThrows("'use strict'; let g = ({x}) => { const x = 0; }", SyntaxError);
}());