| 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);
|
| }
|
|
|