| 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 6fe292ae7bb080e3ab0050adf1156820a35d321f..901a8f2a6c5a5fd813962affb14374c2e6010b3c 100644
|
| --- a/pkg/analyzer/lib/src/generated/resolver.dart
|
| +++ b/pkg/analyzer/lib/src/generated/resolver.dart
|
| @@ -10706,6 +10706,11 @@ class ResolverVisitor extends ScopedVisitor {
|
| @override
|
| Object visitDefaultFormalParameter(DefaultFormalParameter node) {
|
| super.visitDefaultFormalParameter(node);
|
| + ParameterElement element = node.element;
|
| + if (element.initializer != null && node.defaultValue != null) {
|
| + (element.initializer as FunctionElementImpl).returnType =
|
| + node.defaultValue.staticType;
|
| + }
|
| FormalParameterList parent = node.parent;
|
| AstNode grandparent = parent.parent;
|
| if (grandparent is ConstructorDeclaration &&
|
| @@ -11131,6 +11136,10 @@ class ResolverVisitor extends ScopedVisitor {
|
| Object visitVariableDeclaration(VariableDeclaration node) {
|
| super.visitVariableDeclaration(node);
|
| VariableElement element = node.element;
|
| + if (element.initializer != null && node.initializer != null) {
|
| + (element.initializer as FunctionElementImpl).returnType =
|
| + node.initializer.staticType;
|
| + }
|
| // Note: in addition to cloning the initializers for const variables, we
|
| // have to clone the initializers for non-static final fields (because if
|
| // they occur in a class with a const constructor, they will be needed to
|
|
|