diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-03-20 10:46:22 +0100 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-03-20 10:46:22 +0100 |
commit | 9b488c7cffa2da0816cae4d7a884a193ebab2341 (patch) | |
tree | e871716443289e196226c2f40c3a31b09904efb1 /js/src/tests | |
parent | 1664c8df00bff646617feeec2f6bd16f331caf3b (diff) | |
download | uxp-9b488c7cffa2da0816cae4d7a884a193ebab2341.tar.gz |
Bug 1322314 - Do not emit ParseNode twice in BytecodeEmitter::emitDestructuringOpsArray
Issue mcp-graveyard/UXP#73
[Depends on] Bug 1147371: Implement IteratorClose
Diffstat (limited to 'js/src/tests')
-rw-r--r-- | js/src/tests/ecma_6/Destructuring/array-default-class.js | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/js/src/tests/ecma_6/Destructuring/array-default-class.js b/js/src/tests/ecma_6/Destructuring/array-default-class.js new file mode 100644 index 0000000000..5aa9c579b1 --- /dev/null +++ b/js/src/tests/ecma_6/Destructuring/array-default-class.js @@ -0,0 +1,25 @@ +var BUGNUMBER = 1322314; +var summary = "Function in computed property in class expression in array destructuring default"; + +print(BUGNUMBER + ": " + summary); + +function* g([ + a = class E { + [ (function() { return "foo"; })() ]() { + return 10; + } + } +]) { + yield a; +} + +let C = [...g([])][0]; +let x = new C(); +assertEq(x.foo(), 10); + +C = [...g([undefined])][0]; +x = new C(); +assertEq(x.foo(), 10); + +if (typeof reportCompare === "function") + reportCompare(0, 0); |