Fix regression with non-ascii function identifiers

Regression since 110a1ac885
This commit is contained in:
Anthony Van de Gejuchte
2016-11-30 21:50:31 +01:00
committed by Richard van Velzen
parent 962b1f3d40
commit b11c5151bc
2 changed files with 9 additions and 5 deletions

View File

@@ -951,11 +951,7 @@ function OutputStream(options) {
}
}
if (self.name instanceof AST_Symbol) {
if (typeof self.name.name === "string" && !is_identifier_string(self.name.name)) {
output.print_string(self.name.name);
} else {
self.name.print(output);
}
self.name.print(output);
} else if (nokeyword && self.name instanceof AST_Node) {
output.with_square(function() {
self.name.print(output); // Computed method name

View File

@@ -0,0 +1,8 @@
non_ascii_function_identifier_name: {
input: {
function fooλ(δλ) {}
function λ(δλ) {}
(function λ(δλ) {})()
}
expect_exact: "function fooλ(δλ){}function λ(δλ){}(function λ(δλ){})();"
}