Index: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/resolver/TypeResolverVisitor.java |
diff --git a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/resolver/TypeResolverVisitor.java b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/resolver/TypeResolverVisitor.java |
index d816b301bee12e220838a1c01842c0389ed95455..63e8faa68c5de946fba6c12551fd29fb862cf254 100644 |
--- a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/resolver/TypeResolverVisitor.java |
+++ b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/resolver/TypeResolverVisitor.java |
@@ -446,9 +446,12 @@ public class TypeResolverVisitor extends ScopedVisitor { |
@Override |
public Void visitFunctionTypeAlias(FunctionTypeAlias node) { |
- super.visitFunctionTypeAlias(node); |
FunctionTypeAliasElementImpl element = (FunctionTypeAliasElementImpl) node.getElement(); |
- element.setReturnType(computeReturnType(node.getReturnType())); |
+ if (element.getReturnType() == null) { |
+ // Only visit function type aliases once. |
+ super.visitFunctionTypeAlias(node); |
+ element.setReturnType(computeReturnType(node.getReturnType())); |
+ } |
return null; |
} |