Index: pkg/compiler/lib/src/elements/modelx.dart |
diff --git a/pkg/compiler/lib/src/elements/modelx.dart b/pkg/compiler/lib/src/elements/modelx.dart |
index bf12be6392c2b8aaab0b8f03fa20186f58f1e70d..b193876080eaceaeecf540740849ca3ea8284f98 100644 |
--- a/pkg/compiler/lib/src/elements/modelx.dart |
+++ b/pkg/compiler/lib/src/elements/modelx.dart |
@@ -2483,20 +2483,17 @@ class ConstructorBodyElementX extends BaseFunctionElementX |
if (node.hasEmptyBody) return null; |
ClassElement classElement = constructor.enclosingClass; |
ConstructorBodyElement bodyElement; |
- classElement.forEachBackendMember((Element backendMember) { |
- if (backendMember.isGenerativeConstructorBody) { |
- ConstructorBodyElement body = backendMember; |
- if (body.constructor == constructor) { |
- // TODO(kasperl): Find a way of stopping the iteration |
- // through the backend members. |
- bodyElement = backendMember; |
- } |
+ classElement.forEachConstructorBody((ConstructorBodyElement body) { |
+ if (body.constructor == constructor) { |
+ // TODO(kasperl): Find a way of stopping the iteration |
+ // through the backend members. |
+ bodyElement = body; |
} |
}); |
if (bodyElement == null) { |
bodyElement = |
new ConstructorBodyElementX(constructorResolvedAst, constructor); |
- classElement.addBackendMember(bodyElement); |
+ classElement.addConstructorBody(bodyElement); |
if (constructor.isPatch) { |
// Create origin body element for patched constructors. |
@@ -2504,7 +2501,7 @@ class ConstructorBodyElementX extends BaseFunctionElementX |
ConstructorBodyElementX origin = new ConstructorBodyElementX( |
constructorResolvedAst, constructor.origin); |
origin.applyPatch(patch); |
- classElement.origin.addBackendMember(bodyElement.origin); |
+ classElement.origin.addConstructorBody(bodyElement.origin); |
} |
} |
assert(bodyElement.isGenerativeConstructorBody); |