summaryrefslogtreecommitdiffstats
path: root/js/src/tests/ecma_6
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/tests/ecma_6')
-rw-r--r--js/src/tests/ecma_6/Class/parenExprToString.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/js/src/tests/ecma_6/Class/parenExprToString.js b/js/src/tests/ecma_6/Class/parenExprToString.js
new file mode 100644
index 000000000..a93972ce9
--- /dev/null
+++ b/js/src/tests/ecma_6/Class/parenExprToString.js
@@ -0,0 +1,8 @@
+// Test that parenthesized class expressions don't get their toString offsets
+// messed up.
+
+assertEq((class {}).toString(), "class {}");
+assertEq(((class {})).toString(), "class {}");
+
+if (typeof reportCompare === "function")
+ reportCompare(0, 0, "OK");