diff options
Diffstat (limited to 'js/src/tests/non262/expressions/optional-chain-class-heritage.js')
-rw-r--r-- | js/src/tests/non262/expressions/optional-chain-class-heritage.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/js/src/tests/non262/expressions/optional-chain-class-heritage.js b/js/src/tests/non262/expressions/optional-chain-class-heritage.js new file mode 100644 index 0000000000..14a99c6392 --- /dev/null +++ b/js/src/tests/non262/expressions/optional-chain-class-heritage.js @@ -0,0 +1,10 @@ +// Optional expression can be part of a class heritage expression. + +var a = {b: null}; + +class C extends a?.b {} + +assertEq(Object.getPrototypeOf(C.prototype), null); + +if (typeof reportCompare === "function") + reportCompare(true, true); |