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 fb10635bea3c360447147046384b38a4df056af1..e6304dfeed30a800bb6e90cef3aba59000219829 100644 |
--- a/pkg/compiler/lib/src/elements/modelx.dart |
+++ b/pkg/compiler/lib/src/elements/modelx.dart |
@@ -151,7 +151,7 @@ abstract class ElementX extends Element with ElementCommon { |
Name get memberName => new Name(name, library); |
- LibraryElementX get implementationLibrary { |
+ LibraryElement get implementationLibrary { |
Element element = this; |
while (!identical(element.kind, ElementKind.LIBRARY)) { |
element = element.enclosingElement; |
@@ -716,7 +716,8 @@ class CompilationUnitElementX extends ElementX |
localMembers = localMembers.prepend(element); |
// Provide the member to the library to build scope. |
if (enclosingElement.isPatch) { |
- implementationLibrary.addMember(element, reporter); |
+ LibraryElementX library = implementationLibrary; |
+ library.addMember(element, reporter); |
} else { |
library.addMember(element, reporter); |
} |