diff options
Diffstat (limited to 'js/src/tests/non262/class/derivedConstructorArrowEvalNestedSuperCall.js')
-rw-r--r-- | js/src/tests/non262/class/derivedConstructorArrowEvalNestedSuperCall.js | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/js/src/tests/non262/class/derivedConstructorArrowEvalNestedSuperCall.js b/js/src/tests/non262/class/derivedConstructorArrowEvalNestedSuperCall.js new file mode 100644 index 0000000000..d81f186485 --- /dev/null +++ b/js/src/tests/non262/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"); |