diff options
Diffstat (limited to 'js/src/tests/ecma_6/Class/derivedConstructorArrowEvalSuperCall.js')
-rw-r--r-- | js/src/tests/ecma_6/Class/derivedConstructorArrowEvalSuperCall.js | 18 |
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"); |