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 | caa2a53c402c7b509e9939e9aefe595dc0dbe516 (patch) | |
tree | e871716443289e196226c2f40c3a31b09904efb1 /js/src/tests/ecma_6/Destructuring/array-default-class.js | |
parent | 3ee73ca14cec9ac99ebee938d76650ad11aa98da (diff) | |
download | UXP-caa2a53c402c7b509e9939e9aefe595dc0dbe516.tar UXP-caa2a53c402c7b509e9939e9aefe595dc0dbe516.tar.gz UXP-caa2a53c402c7b509e9939e9aefe595dc0dbe516.tar.lz UXP-caa2a53c402c7b509e9939e9aefe595dc0dbe516.tar.xz UXP-caa2a53c402c7b509e9939e9aefe595dc0dbe516.zip |
Bug 1322314 - Do not emit ParseNode twice in BytecodeEmitter::emitDestructuringOpsArray
Issue #73
[Depends on] Bug 1147371: Implement IteratorClose
Diffstat (limited to 'js/src/tests/ecma_6/Destructuring/array-default-class.js')
-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 000000000..5aa9c579b --- /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); |