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