| 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 58d44411abd83516d40d5f554f55dc2b1edeaf92..983e2b2ef7a2083ec296e12a724cdd16388e382b 100644
|
| --- a/dart/lib/compiler/implementation/elements/elements.dart
|
| +++ b/dart/lib/compiler/implementation/elements/elements.dart
|
| @@ -448,8 +448,9 @@ class TypedefElement extends Element implements TypeDeclarationElement {
|
|
|
| Type computeType(Compiler compiler) {
|
| if (cachedType !== null) return cachedType;
|
| - cachedType = compiler.computeFunctionType(
|
| - this, compiler.resolveTypedef(this));
|
| + cachedType = new FunctionType(null, null, this);
|
| + cachedType.initializeFrom(
|
| + compiler.computeFunctionType(this, compiler.resolveTypedef(this)));
|
| return cachedType;
|
| }
|
|
|
| @@ -891,6 +892,9 @@ class ClassElement extends ContainerElement
|
| Link<Type> interfaces = const EmptyLink<Type>();
|
| bool isResolved = false;
|
| bool isBeingResolved = false;
|
| + bool isLoadingSupertypes = false;
|
| + bool supertypesAreLoaded = false;
|
| +
|
| // backendMembers are members that have been added by the backend to simplify
|
| // compilation. They don't have any user-side counter-part.
|
| Link<Element> backendMembers = const EmptyLink<Element>();
|
| @@ -929,7 +933,12 @@ class ClassElement extends ContainerElement
|
| Link<Type> get typeVariables() => type.arguments;
|
|
|
| ClassElement ensureResolved(Compiler compiler) {
|
| - compiler.resolveClass(this);
|
| + if (!isResolved && !isBeingResolved) {
|
| + isBeingResolved = true;
|
| + compiler.resolver.resolveClass(this);
|
| + isBeingResolved = false;
|
| + isResolved = true;
|
| + }
|
| return this;
|
| }
|
|
|
| @@ -948,9 +957,25 @@ class ClassElement extends ContainerElement
|
| if (e.modifiers.isStatic()) continue;
|
| return e;
|
| }
|
| + if (isInterface()) {
|
| + return lookupSuperInterfaceMember(memberName, getLibrary());
|
| + }
|
| return null;
|
| }
|
|
|
| + Element lookupSuperInterfaceMember(SourceString memberName,
|
| + LibraryElement fromLibrary) {
|
| + 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 (memberName.isPrivate() && fromLibrary !== e.getLibrary()) continue;
|
| + // Static members are not inherited.
|
| + if (e.modifiers.isStatic()) continue;
|
| + return e;
|
| + }
|
| + }
|
| +
|
| /**
|
| * Find the first member in the class chain with the given
|
| * [memberName]. This method is NOT to be used for resolving
|
|
|