| 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 788f253a7c1fcc844aa7067567f10e2495fde694..2d650e9d4c7ecc5bd84600297ac11247d92745a0 100644
|
| --- a/pkg/analyzer/lib/src/summary/link.dart
|
| +++ b/pkg/analyzer/lib/src/summary/link.dart
|
| @@ -3151,10 +3151,15 @@ class NonstaticMemberElementForLink implements ReferenceableElementForLink {
|
| @override
|
| DartType get asStaticType {
|
| Element element = this.element;
|
| - if (element is PropertyAccessorElement && element.isGetter) {
|
| - return element.returnType;
|
| + if (element is PropertyAccessorElement) {
|
| + if (element.isGetter) {
|
| + return element.returnType;
|
| + }
|
| + return DynamicTypeImpl.instance;
|
| + }
|
| + if (element is MethodElement) {
|
| + return element.type;
|
| }
|
| - // TODO(paulberry): implement.
|
| return DynamicTypeImpl.instance;
|
| }
|
|
|
| @@ -3175,6 +3180,7 @@ class NonstaticMemberElementForLink implements ReferenceableElementForLink {
|
| DartType type = asStaticType;
|
| if (type is InterfaceType) {
|
| Element nameElement = type.lookUpGetter(name, element.library);
|
| + nameElement ??= type.lookUpMethod(name, element.library);
|
| return new NonstaticMemberElementForLink(nameElement, _constNode);
|
| }
|
| }
|
| @@ -4169,7 +4175,9 @@ class VariableElementForLink
|
| if (linker.strongMode) {
|
| DartType type = asStaticType;
|
| if (type is InterfaceType) {
|
| - return type.lookUpGetter(name, compilationUnit.library);
|
| + Element result = type.lookUpGetter(name, compilationUnit.library);
|
| + result ??= type.lookUpMethod(name, compilationUnit.library);
|
| + return result;
|
| }
|
| }
|
| // TODO(scheglov): implement for propagated types
|
|
|