diff options
Diffstat (limited to 'js/src/tests/ecma_6/Class/derivedConstructorTDZReturnTry.js')
-rw-r--r-- | js/src/tests/ecma_6/Class/derivedConstructorTDZReturnTry.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/js/src/tests/ecma_6/Class/derivedConstructorTDZReturnTry.js b/js/src/tests/ecma_6/Class/derivedConstructorTDZReturnTry.js new file mode 100644 index 000000000..96791c0e7 --- /dev/null +++ b/js/src/tests/ecma_6/Class/derivedConstructorTDZReturnTry.js @@ -0,0 +1,16 @@ +class base {} +class derived extends base { + constructor() { + try { + return; + } catch (e) { + try { + return; + } catch (e) {} + } + } +} +assertThrowsInstanceOf(() => new derived, ReferenceError); + +if (typeof reportCompare === 'function') + reportCompare(0,0,"OK"); |