| Index: dart/frog/leg/elements/elements.dart
|
| diff --git a/dart/frog/leg/elements/elements.dart b/dart/frog/leg/elements/elements.dart
|
| index 4850bc075138726cbe2bab1ebd806ba234b72312..de049c41238ca4ab3e4dac69b87e674a978ce3c8 100644
|
| --- a/dart/frog/leg/elements/elements.dart
|
| +++ b/dart/frog/leg/elements/elements.dart
|
| @@ -132,7 +132,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
|
| @@ -282,7 +284,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);
|
| }
|
| });
|
| }
|
| @@ -682,7 +684,11 @@ class ClassElement extends ContainerElement {
|
| Element lookupSuperMember(SourceString name) {
|
| for (ClassElement s = superclass; s != null; s = s.superclass) {
|
| Element e = s.lookupLocalMember(name);
|
| - if (e !== null) return e;
|
| + if (e !== null) {
|
| + if (!name.isPrivate() || getLibrary() === e.getLibrary()) {
|
| + return e;
|
| + }
|
| + }
|
| }
|
| return null;
|
| }
|
|
|