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

Unified Diff: pkg/analyzer/lib/src/summary/link.dart

Issue 2485043004: Don't serialize elements of top-level function/constructor/method bodies. (Closed)
Patch Set: Created 4 years, 1 month 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
Index: pkg/analyzer/lib/src/summary/link.dart
diff --git a/pkg/analyzer/lib/src/summary/link.dart b/pkg/analyzer/lib/src/summary/link.dart
index ea25920c1156c792e894a411b3760042c0c6183e..87828c393b44993dd6d8f2e77ba6b275536bea97 100644
--- a/pkg/analyzer/lib/src/summary/link.dart
+++ b/pkg/analyzer/lib/src/summary/link.dart
@@ -3104,8 +3104,10 @@ class FunctionElementForLink_Local_NonSynthetic extends ExecutableElementForLink
* Store the results of type inference for this function in [compilationUnit].
*/
void link(CompilationUnitElementInBuildUnit compilationUnit) {
- compilationUnit._storeLinkedType(
- _unlinkedExecutable.inferredReturnTypeSlot, inferredReturnType, this);
+ if (_unlinkedExecutable.returnType == null) {
+ compilationUnit._storeLinkedType(
+ _unlinkedExecutable.inferredReturnTypeSlot, inferredReturnType, this);
+ }
for (FunctionElementForLink_Local_NonSynthetic function in functions) {
function.link(compilationUnit);
}

Powered by Google App Engine
This is Rietveld 408576698