Index: pkg/analyzer/lib/src/generated/resolver.dart |
diff --git a/pkg/analyzer/lib/src/generated/resolver.dart b/pkg/analyzer/lib/src/generated/resolver.dart |
index 9941049141386cdbbb4d1b27f14eaed72a4c6838..b589a298377e6aa6733faca0da6910b74cfcff03 100644 |
--- a/pkg/analyzer/lib/src/generated/resolver.dart |
+++ b/pkg/analyzer/lib/src/generated/resolver.dart |
@@ -9761,6 +9761,15 @@ class TypeResolverVisitor extends ScopedVisitor { |
AnalysisEngine.instance.logger.logError(buffer.toString(), |
new CaughtException(new AnalysisException(), null)); |
} |
+ |
+ // When the library is resynthesized, types of all of its elements are |
+ // already set - statically or inferred. We don't want to overwrite them. |
+ // See also dartbug.com/27482 for separating static and inferred types. |
Paul Berry
2016/11/09 16:47:22
Do we still need the pointer to bug 27482 now that
|
+ if (LibraryElementImpl.hasResolutionCapability( |
+ definingLibrary, LibraryResolutionCapability.resolvedTypeNames)) { |
+ return null; |
+ } |
+ |
element.declaredReturnType = _computeReturnType(node.returnType); |
element.type = new FunctionTypeImpl(element); |
_inferSetterReturnType(element); |
@@ -9777,6 +9786,7 @@ class TypeResolverVisitor extends ScopedVisitor { |
} |
} |
} |
+ |
return null; |
} |