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 db285be7446542d499059f2cc318fb3d2e1c4d9e..ef4e7c4443ed63b98697269702690d0e6dd97331 100644 |
--- a/dart/lib/compiler/implementation/elements/elements.dart |
+++ b/dart/lib/compiler/implementation/elements/elements.dart |
@@ -214,6 +214,8 @@ class Element implements Hashable { |
bool _isNative = false; |
void setNative() { _isNative = true; } |
bool isNative() => _isNative; |
+ |
+ FunctionElement asFunctionElement() => null; |
} |
class ContainerElement extends Element { |
@@ -640,6 +642,8 @@ class FunctionElement extends Element { |
Node parseNode(DiagnosticListener listener) => cachedNode; |
Token position() => cachedNode.getBeginToken(); |
+ |
+ FunctionElement asFunctionElement() => this; |
} |
class ConstructorBodyElement extends FunctionElement { |
@@ -754,11 +758,12 @@ class ClassElement extends ContainerElement { |
Element lookupSuperMember(SourceString memberName) { |
for (ClassElement s = superclass; s != null; s = s.superclass) { |
Element e = s.lookupLocalMember(memberName); |
- if (e !== null) { |
- if (!memberName.isPrivate() || getLibrary() === e.getLibrary()) { |
- return e; |
- } |
- } |
+ if (e === null) continue; |
+ // Private members from a different library are not visible. |
+ if (memberName.isPrivate() && getLibrary() !== e.getLibrary()) continue; |
+ // Static members are not inherited. |
+ if (e.modifiers.isStatic()) continue; |
+ return e; |
} |
return null; |
} |