Fixes name collision issue, which is not directly related to this patch but has an additional case in debug mode. Added regression test.
37 lines
679 B
JavaScript
37 lines
679 B
JavaScript
issue_1321_no_debug: {
|
|
mangle_props = {
|
|
ignore_quoted: true
|
|
}
|
|
input: {
|
|
var x = {};
|
|
x.foo = 1;
|
|
x["a"] = 2 * x.foo;
|
|
console.log(x.foo, x["a"]);
|
|
}
|
|
expect: {
|
|
var x = {};
|
|
x.b = 1;
|
|
x["a"] = 2 * x.b;
|
|
console.log(x.b, x["a"]);
|
|
}
|
|
}
|
|
|
|
issue_1321_debug: {
|
|
mangle_props = {
|
|
ignore_quoted: true,
|
|
debug: ""
|
|
}
|
|
input: {
|
|
var x = {};
|
|
x.foo = 1;
|
|
x["_$foo$_"] = 2 * x.foo;
|
|
console.log(x.foo, x["_$foo$_"]);
|
|
}
|
|
expect: {
|
|
var x = {};
|
|
x.a = 1;
|
|
x["_$foo$_"] = 2 * x.a;
|
|
console.log(x.a, x["_$foo$_"]);
|
|
}
|
|
}
|