aboutsummaryrefslogtreecommitdiff
path: root/test/compress
diff options
context:
space:
mode:
Diffstat (limited to 'test/compress')
-rw-r--r--test/compress/properties.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/compress/properties.js b/test/compress/properties.js
index 3e06dc1e..d49b9ea4 100644
--- a/test/compress/properties.js
+++ b/test/compress/properties.js
@@ -555,3 +555,20 @@ native_prototype: {
"".indexOf.call(e, "bar");
}
}
+
+issue_2040: {
+ input: {
+ var a = 1;
+ var b = {
+ get "a-b"() {
+ return a;
+ },
+ set "a-b"(c) {
+ a = c;
+ }
+ };
+ console.log(b["a-b"], b["a-b"] = 2, b["a-b"]);
+ }
+ expect_exact: 'var a=1;var b={get"a-b"(){return a},set"a-b"(c){a=c}};console.log(b["a-b"],b["a-b"]=2,b["a-b"]);'
+ expect_stdout: "1 2 2"
+}