summaryrefslogtreecommitdiffstats
path: root/js/src/tests/ecma_6/Class/derivedConstructorArrowEvalSuperCall.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/tests/ecma_6/Class/derivedConstructorArrowEvalSuperCall.js')
-rw-r--r--js/src/tests/ecma_6/Class/derivedConstructorArrowEvalSuperCall.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/js/src/tests/ecma_6/Class/derivedConstructorArrowEvalSuperCall.js b/js/src/tests/ecma_6/Class/derivedConstructorArrowEvalSuperCall.js
new file mode 100644
index 000000000..0f60df746
--- /dev/null
+++ b/js/src/tests/ecma_6/Class/derivedConstructorArrowEvalSuperCall.js
@@ -0,0 +1,18 @@
+new class extends class { } {
+ constructor() {
+ assertEq(eval("super(); this"), this);
+ assertEq(this, eval("this"));
+ assertEq(this, (()=>this)());
+ }
+}();
+
+new class extends class { } {
+ constructor() {
+ (()=>super())();
+ assertEq(this, eval("this"));
+ assertEq(this, (()=>this)());
+ }
+}();
+
+if (typeof reportCompare === 'function')
+ reportCompare(0,0,"OK");