Chromium Code Reviews| 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 a4b896dd97198bba49ec40695821f1fd7ed2a6e6..3d8068a5a14fdd32ffb94e19932065635ca01e13 100644 |
| --- a/pkg/analyzer/lib/src/summary/link.dart |
| +++ b/pkg/analyzer/lib/src/summary/link.dart |
| @@ -3277,7 +3277,7 @@ class ParameterElementForLink implements ParameterElementImpl { |
| * linking. |
| */ |
| abstract class PropertyAccessorElementForLink |
| - implements PropertyAccessorElementImpl { |
| + implements PropertyAccessorElementImpl, ReferenceableElementForLink { |
| void link(CompilationUnitElementInBuildUnit compilationUnit); |
| } |
| @@ -3334,6 +3334,15 @@ class PropertyAccessorElementForLink_Variable |
| PropertyAccessorElementForLink_Variable(this._variable, this.isSetter); |
| @override |
| + DartType get asStaticType => returnType; |
| + |
| + @override |
| + TypeInferenceNode get asTypeInferenceNode { |
| + // TODO(scheglov) is this correct? |
|
Paul Berry
2016/04/15 21:15:52
Yes, I believe this is correct, but only because o
|
| + return null; |
| + } |
| + |
| + @override |
| Element get enclosingElement => _variable.enclosingElement; |
| @override |
| @@ -3381,6 +3390,19 @@ class PropertyAccessorElementForLink_Variable |
| return const []; |
| } |
| + ReferenceableElementForLink getContainedName(String name) { |
| + DartType type = returnType; |
| + if (type is InterfaceType) { |
| + PropertyAccessorElement getter = |
| + type.lookUpGetter(name, _variable.compilationUnit.library); |
| + print('getter: $getter'); |
|
Paul Berry
2016/04/15 21:15:52
Looks like temporary debugging code; should be rem
|
| + if (getter is PropertyAccessorElementForLink) { |
| + return getter; |
| + } |
| + } |
| + return new NonstaticMemberElementForLink(null); |
| + } |
| + |
| @override |
| bool isAccessibleIn(LibraryElement library) => |
| !Identifier.isPrivateName(name) || identical(this.library, library); |
| @@ -4077,6 +4099,14 @@ class VariableElementForLink |
| DynamicTypeImpl.instance; |
| ReferenceableElementForLink getContainedName(String name) { |
| + DartType type = asStaticType; |
| + if (type is InterfaceType) { |
| + PropertyAccessorElement getter = |
| + type.lookUpGetter(name, compilationUnit.library); |
| + if (getter is PropertyAccessorElementForLink) { |
| + return getter; |
| + } |
| + } |
| return new NonstaticMemberElementForLink(_constNode); |
| } |