aboutsummaryrefslogtreecommitdiff
path: root/test/compress/pure_getters.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/compress/pure_getters.js')
-rw-r--r--test/compress/pure_getters.js46
1 files changed, 46 insertions, 0 deletions
diff --git a/test/compress/pure_getters.js b/test/compress/pure_getters.js
index 13f9d4fe..bf6f73ef 100644
--- a/test/compress/pure_getters.js
+++ b/test/compress/pure_getters.js
@@ -1490,3 +1490,49 @@ issue_4751: {
};
}
}
+
+super_toString: {
+ options = {
+ pure_getters: true,
+ unsafe: true,
+ }
+ input: {
+ console.log({
+ f() {
+ return super.toString();
+ },
+ }.f());
+ }
+ expect: {
+ console.log({
+ f() {
+ return super.toString();
+ },
+ }.f());
+ }
+ expect_stdout: "[object Object]"
+ node_version: ">=4"
+}
+
+this_toString: {
+ options = {
+ pure_getters: true,
+ unsafe: true,
+ }
+ input: {
+ console.log({
+ f() {
+ return this.toString();
+ },
+ }.f());
+ }
+ expect: {
+ console.log({
+ f() {
+ return "" + this;
+ },
+ }.f());
+ }
+ expect_stdout: "[object Object]"
+ node_version: ">=4"
+}