diff options
Diffstat (limited to 'js/src/tests/ecma_6/Class/derivedConstructorTDZExplicitThis.js')
-rw-r--r-- | js/src/tests/ecma_6/Class/derivedConstructorTDZExplicitThis.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/js/src/tests/ecma_6/Class/derivedConstructorTDZExplicitThis.js b/js/src/tests/ecma_6/Class/derivedConstructorTDZExplicitThis.js new file mode 100644 index 000000000..fc5dd3858 --- /dev/null +++ b/js/src/tests/ecma_6/Class/derivedConstructorTDZExplicitThis.js @@ -0,0 +1,12 @@ +class foo extends null { + constructor() { + this; + assertEq(false, true); + } +} + +for (let i = 0; i < 1100; i++) + assertThrownErrorContains(() => new foo(), "|this|"); + +if (typeof reportCompare === 'function') + reportCompare(0,0,"OK"); |