summaryrefslogtreecommitdiffstats
path: root/js/src/tests/ecma_6/Expressions/destructuring-array-lexical.js
blob: 133858a09de37614e0c093c86945103d1073b3d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
var BUGNUMBER = 1184922;
var summary = "Array destructuring with accessing uninitialized lexical binding.";

print(BUGNUMBER + ": " + summary);

assertThrowsInstanceOf(() => { let y = [y] = []; },
                       ReferenceError);
assertThrowsInstanceOf(() => { let y = [y] = [,]; },
                       ReferenceError);

if (typeof reportCompare === "function")
  reportCompare(true, true);