Chromium Code Reviews| Index: pkg/compiler/lib/src/resolution/class_hierarchy.dart |
| diff --git a/pkg/compiler/lib/src/resolution/class_hierarchy.dart b/pkg/compiler/lib/src/resolution/class_hierarchy.dart |
| index 13a6855fa566b5b1ce50fe78e44538cd00f4db6c..40d3d59f92e5fa18e188e979181abbcfab9c7319 100644 |
| --- a/pkg/compiler/lib/src/resolution/class_hierarchy.dart |
| +++ b/pkg/compiler/lib/src/resolution/class_hierarchy.dart |
| @@ -270,16 +270,17 @@ class ClassResolverVisitor extends TypeDefinitionVisitor { |
| new Modifiers.withFlags(new NodeList.empty(), Modifiers.FLAG_ABSTRACT)); |
| // Create synthetic type variables for the mixin application. |
| List<DartType> typeVariables = <DartType>[]; |
| + int index = 0; |
| element.typeVariables.forEach((TypeVariableType type) { |
|
floitsch
2015/06/26 20:54:04
Since this closure captures something I would slig
Johnni Winther
2015/07/03 12:13:44
Done.
|
| TypeVariableElementX typeVariableElement = new TypeVariableElementX( |
| - type.name, mixinApplication, type.element.node); |
| + type.name, mixinApplication, index, type.element.node); |
| TypeVariableType typeVariable = new TypeVariableType(typeVariableElement); |
| typeVariables.add(typeVariable); |
| + index++; |
| }); |
| // Setup bounds on the synthetic type variables. |
| - int index = 0; |
| element.typeVariables.forEach((TypeVariableType type) { |
| - TypeVariableType typeVariable = typeVariables[index++]; |
| + TypeVariableType typeVariable = typeVariables[type.element.index]; |
| TypeVariableElementX typeVariableElement = typeVariable.element; |
| typeVariableElement.typeCache = typeVariable; |
| typeVariableElement.boundCache = |
| @@ -309,8 +310,11 @@ class ClassResolverVisitor extends TypeDefinitionVisitor { |
| FunctionElement createForwardingConstructor(ConstructorElement target, |
| ClassElement enclosing) { |
| - return new SynthesizedConstructorElementX.notForDefault( |
| - target.name, target, enclosing); |
| + FunctionElement constructor = |
| + new SynthesizedConstructorElementX.notForDefault( |
| + target.name, target, enclosing); |
| + constructor.computeType(compiler); |
| + return constructor; |
| } |
| void doApplyMixinTo(MixinApplicationElementX mixinApplication, |
| @@ -566,8 +570,10 @@ class ClassSupertypeResolver extends CommonResolverVisitor { |
| super(compiler); |
| void loadSupertype(ClassElement element, Node from) { |
| - compiler.resolver.loadSupertypes(element, from); |
| - element.ensureResolved(compiler); |
| + if (!element.isResolved) { |
| + compiler.resolver.loadSupertypes(element, from); |
| + element.ensureResolved(compiler); |
| + } |
| } |
| void visitNodeList(NodeList node) { |