| Index: dart/frog/leg/elements/elements.dart
|
| diff --git a/dart/frog/leg/elements/elements.dart b/dart/frog/leg/elements/elements.dart
|
| index f322ab57b88f6e7f5a77ed2cffa66755899a27b6..05234cf238227041804e786650058264d9dd7bfe 100644
|
| --- a/dart/frog/leg/elements/elements.dart
|
| +++ b/dart/frog/leg/elements/elements.dart
|
| @@ -142,7 +142,9 @@ class Element implements Hashable {
|
| return token;
|
| }
|
|
|
| - const Element(this.name, this.kind, this.enclosingElement);
|
| + Element(this.name, this.kind, this.enclosingElement) {
|
| + assert(getLibrary() !== null);
|
| + }
|
|
|
| // TODO(kasperl): This is a very bad hash code for the element and
|
| // there's no reason why two elements with the same name should have
|
| @@ -292,7 +294,7 @@ class LibraryElement extends CompilationUnitElement {
|
| if (this === e.getLibrary()
|
| && e.kind !== ElementKind.PREFIX
|
| && e.kind !== ElementKind.FOREIGN) {
|
| - f(e);
|
| + if (!e.name.isPrivate()) f(e);
|
| }
|
| });
|
| }
|
| @@ -715,7 +717,11 @@ 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) return e;
|
| + if (e !== null) {
|
| + if (!memberName.isPrivate() || getLibrary() === e.getLibrary()) {
|
| + return e;
|
| + }
|
| + }
|
| }
|
| return null;
|
| }
|
|
|