summaryrefslogtreecommitdiff
path: root/js/src/tests/non262/expressions/optional-chain-super-elem.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/tests/non262/expressions/optional-chain-super-elem.js')
-rw-r--r--js/src/tests/non262/expressions/optional-chain-super-elem.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/js/src/tests/non262/expressions/optional-chain-super-elem.js b/js/src/tests/non262/expressions/optional-chain-super-elem.js
new file mode 100644
index 000000000..3b912a9ad
--- /dev/null
+++ b/js/src/tests/non262/expressions/optional-chain-super-elem.js
@@ -0,0 +1,12 @@
+// Don't assert.
+
+var obj = {
+ m() {
+ super[0]?.a
+ }
+};
+
+obj.m();
+
+if (typeof reportCompare === "function")
+ reportCompare(true, true);