committed by
Richard van Velzen
parent
6fd9b338dd
commit
d9bc6f303c
@@ -909,7 +909,7 @@ function OutputStream(options) {
|
||||
parent instanceof AST_Unary ||
|
||||
parent instanceof AST_Call;
|
||||
if (needs_parens) { output.print("(") }
|
||||
if (self.argnames.length === 1 && self.argnames[0] instanceof AST_Symbol) {
|
||||
if (self.argnames.length === 1 && self.argnames[0] instanceof AST_Symbol && !self.argnames[0].default) {
|
||||
self.argnames[0].print(output);
|
||||
} else {
|
||||
output.with_parens(function(){
|
||||
|
||||
@@ -82,4 +82,11 @@ arrow_functions_with_body: {
|
||||
b.join();
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
arrow_function_with_single_parameter_with_default: {
|
||||
input: {
|
||||
var foo = (a = 0) => doSomething(a);
|
||||
}
|
||||
expect_exact: "var foo=(a=0)=>doSomething(a);"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user