summaryrefslogtreecommitdiffstats
path: root/js/src/tests/ecma_6/Destructuring/array-default-class.js
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-03-27 13:21:13 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-03-27 13:21:13 +0200
commit72721d1d032db2099593076bf96f274623af3c26 (patch)
tree33db746920d307db8270ab90ba12fc0c30850b96 /js/src/tests/ecma_6/Destructuring/array-default-class.js
parent2b7f231ca7f64c9750f65922d92e3b98a3351f79 (diff)
parent2a57d73c3b5304be3f9be51018a1bbee79f007e2 (diff)
downloadUXP-72721d1d032db2099593076bf96f274623af3c26.tar
UXP-72721d1d032db2099593076bf96f274623af3c26.tar.gz
UXP-72721d1d032db2099593076bf96f274623af3c26.tar.lz
UXP-72721d1d032db2099593076bf96f274623af3c26.tar.xz
UXP-72721d1d032db2099593076bf96f274623af3c26.zip
Merge remote-tracking branch 'janek/js_lhs-before-rhs_1'
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.js25
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);