| Index: compiler/java/com/google/dart/compiler/ast/DartToSourceVisitor.java
|
| diff --git a/compiler/java/com/google/dart/compiler/ast/DartToSourceVisitor.java b/compiler/java/com/google/dart/compiler/ast/DartToSourceVisitor.java
|
| index 2d4d80a536a7ff813d670e82ec7b209fbd0475a4..200f1c0dad7fbbe6ccbbc70a76bda93236d38467 100644
|
| --- a/compiler/java/com/google/dart/compiler/ast/DartToSourceVisitor.java
|
| +++ b/compiler/java/com/google/dart/compiler/ast/DartToSourceVisitor.java
|
| @@ -280,7 +280,7 @@ public class DartToSourceVisitor extends ASTVisitor<Void> {
|
| p("set ");
|
| }
|
| // name
|
| - pFunctionDeclaration(x.getName(), func);
|
| + pFunctionDeclaration(x.getName(), func, !x.getModifiers().isGetter());
|
| p(" ");
|
| // initializers
|
| List<DartInitializer> inits = x.getInitializers();
|
| @@ -338,13 +338,15 @@ public class DartToSourceVisitor extends ASTVisitor<Void> {
|
| }
|
| }
|
|
|
| - private void pFunctionDeclaration(DartNode name, DartFunction x) {
|
| + private void pFunctionDeclaration(DartNode name, DartFunction x, boolean includeParameters) {
|
| if (name != null) {
|
| accept(name);
|
| }
|
| - p("(");
|
| - pFormalParameters(x.getParameters());
|
| - p(")");
|
| + if (includeParameters) {
|
| + p("(");
|
| + pFormalParameters(x.getParameters());
|
| + p(")");
|
| + }
|
| }
|
|
|
| private void pFormalParameters(List<DartParameter> params) {
|
| @@ -793,7 +795,7 @@ public class DartToSourceVisitor extends ASTVisitor<Void> {
|
| p(" ");
|
| }
|
| DartIdentifier name = x.getName();
|
| - pFunctionDeclaration(name, x.getFunction());
|
| + pFunctionDeclaration(name, x.getFunction(), true);
|
| p(" ");
|
| if (x.getFunction().getBody() != null) {
|
| pBlock(x.getFunction().getBody(), false);
|
|
|