Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1955)

Unified Diff: compiler/java/com/google/dart/compiler/ast/DartToSourceVisitor.java

Issue 10885031: Issue 3968. Support for redirecting factory constructors (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | compiler/java/com/google/dart/compiler/resolver/MemberBuilder.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 bbb12b31de6487ca8984e429ff2ed787429dd813..4696b392ae836d8a061085b911b04a6f93dbd54f 100644
--- a/compiler/java/com/google/dart/compiler/ast/DartToSourceVisitor.java
+++ b/compiler/java/com/google/dart/compiler/ast/DartToSourceVisitor.java
@@ -296,6 +296,15 @@ public class DartToSourceVisitor extends ASTVisitor<Void> {
// body
if (x.getFunction().getBody() != null) {
accept(x.getFunction().getBody());
+ } else if (x.getRedirectedTypeName() != null) {
+ p(" = ");
+ accept(x.getRedirectedTypeName());
+ if (x.getRedirectedConstructorName() != null) {
+ p(".");
+ accept(x.getRedirectedConstructorName());
+ }
+ p(";");
+ nl();
} else {
p(";");
nl();
« no previous file with comments | « no previous file | compiler/java/com/google/dart/compiler/resolver/MemberBuilder.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698