Fix regression with non-ascii function identifiers
Regression since 110a1ac885
This commit is contained in:
committed by
Richard van Velzen
parent
962b1f3d40
commit
b11c5151bc
@@ -951,11 +951,7 @@ function OutputStream(options) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (self.name instanceof AST_Symbol) {
|
if (self.name instanceof AST_Symbol) {
|
||||||
if (typeof self.name.name === "string" && !is_identifier_string(self.name.name)) {
|
self.name.print(output);
|
||||||
output.print_string(self.name.name);
|
|
||||||
} else {
|
|
||||||
self.name.print(output);
|
|
||||||
}
|
|
||||||
} else if (nokeyword && self.name instanceof AST_Node) {
|
} else if (nokeyword && self.name instanceof AST_Node) {
|
||||||
output.with_square(function() {
|
output.with_square(function() {
|
||||||
self.name.print(output); // Computed method name
|
self.name.print(output); // Computed method name
|
||||||
|
|||||||
8
test/compress/functions.js
Normal file
8
test/compress/functions.js
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
non_ascii_function_identifier_name: {
|
||||||
|
input: {
|
||||||
|
function fooλ(δλ) {}
|
||||||
|
function λ(δλ) {}
|
||||||
|
(function λ(δλ) {})()
|
||||||
|
}
|
||||||
|
expect_exact: "function fooλ(δλ){}function λ(δλ){}(function λ(δλ){})();"
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user