Index: dart/lib/compiler/implementation/elements/elements.dart |
diff --git a/dart/lib/compiler/implementation/elements/elements.dart b/dart/lib/compiler/implementation/elements/elements.dart |
index b3b0fe1244ce38c34a44862a21098b5390c14576..55ad5dd436df0d6b1c0695a72221d430c99cc7e1 100644 |
--- a/dart/lib/compiler/implementation/elements/elements.dart |
+++ b/dart/lib/compiler/implementation/elements/elements.dart |
@@ -274,6 +274,10 @@ class Element implements Hashable { |
Element cloneTo(Element enclosing, DiagnosticListener listener) { |
listener.cancel("Unimplemented cloneTo", element: this); |
} |
+ |
+ Link<Type> get allSupertypesAndSelf() { |
+ return allSupertypes.prepend(new InterfaceType(this)); |
+ } |
} |
class ContainerElement extends Element { |
@@ -1066,6 +1070,24 @@ class ClassElement extends ScopeContainerElement |
if (e.modifiers.isStatic()) continue; |
return e; |
} |
+ if (isInterface()) { |
+ return lookupSuperInterfaceMember(memberName, getLibrary()); |
+ } |
+ return null; |
+ } |
+ |
+ Element lookupSuperInterfaceMember(SourceString memberName, |
+ LibraryElement fromLibrary) { |
+ bool isPrivate = memberName.isPrivate(); |
+ for (Type t in interfaces) { |
+ Element e = t.element.lookupLocalMember(memberName); |
+ if (e === null) continue; |
+ // Private members from a different library are not visible. |
+ if (isPrivate && fromLibrary !== e.getLibrary()) continue; |
+ // Static members are not inherited. |
+ if (e.modifiers.isStatic()) continue; |
+ return e; |
+ } |
return null; |
} |