Index: test/mjsunit/harmony/destructuring.js |
diff --git a/test/mjsunit/harmony/destructuring.js b/test/mjsunit/harmony/destructuring.js |
index 984efb00163330fecfd4a5404cd147e97e2fbd56..50f27857ec04ce302dacb2ab63139ac27167f61c 100644 |
--- a/test/mjsunit/harmony/destructuring.js |
+++ b/test/mjsunit/harmony/destructuring.js |
@@ -991,8 +991,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(); } |
- assertEquals(2, f21({x: 1})); |
+ assertThrows(() => f21({x: 1}), TypeError); |
var g1 = ({x}) => { var x = 2; return x }; |
assertEquals(2, g1({x: 1})); |
@@ -1025,7 +1026,7 @@ |
var g20 = ({x}) => { function x() { return 2 }; return x(); } |
assertEquals(2, g20({x: 1})); |
var g21 = ({x}) => { { function x() { return 2 } } return x(); } |
- assertEquals(2, g21({x: 1})); |
+ 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); |